File tree Expand file tree Collapse file tree 2 files changed +31
-13
lines changed
Expand file tree Collapse file tree 2 files changed +31
-13
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,20 @@ const Navbar = () => {
2323 return (
2424 < div className = "navbar mb-2 flex h-auto min-h-0 flex-row justify-between gap-3 bg-base-300 p-1 md:mb-0 md:flex-col md:p-0" >
2525 < div className = "ml-2 hidden items-center pr-2 md:flex md:text-xl" >
26- < button
27- className = "absolute left-2 text-base-content/30 transition-colors duration-100 ease-in-out hover:text-base-content/80"
28- onClick = { ( ) => settingStore . toggleSideBar ( ) }
26+ < KeyboardTooltip
27+ command = "$mod+M"
28+ placement = "bottom"
29+ showArrow = { false }
30+ className = "-mt-2"
31+ title = "Toggle Sidebar"
2932 >
30- < ShrinkHorizontal />
31- </ button >
33+ < button
34+ className = "absolute left-2 text-base-content/30 transition-colors duration-100 ease-in-out hover:text-base-content/80"
35+ onClick = { ( ) => settingStore . toggleSideBar ( ) }
36+ >
37+ < ShrinkHorizontal />
38+ </ button >
39+ </ KeyboardTooltip >
3240
3341 < FunTitle className = "md:text-xl" />
3442 </ div >
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import { settingStore } from '~/core/setting/SettingStore'
1111import MediaEject from '~/icons/MediaEject'
1212import { Divider } from '@heroui/react'
1313
14+ import KeyboardTooltip from '~/components/KeyboardToolTip'
15+
1416export type AccordionSectionProps = {
1517 isOpen : boolean
1618 onSectionClicked : ( ) => void
@@ -69,15 +71,23 @@ export const SideBar = () => {
6971 </ div >
7072
7173 { /* hide sidebar button */ }
72- < button
73- className = { twMerge (
74- 'group absolute -right-8 top-[45%] z-20 opacity-30 transition-all duration-300 ease-in-out hover:opacity-100 group-hover/sidebar:opacity-100' ,
75- isSidebarOpen && '-right-4' ,
76- ) }
77- onClick = { ( ) => settingStore . toggleSideBar ( ) }
74+ < KeyboardTooltip
75+ command = "$mod+M"
76+ placement = "bottom"
77+ showArrow = { false }
78+ className = "-mt-2"
79+ title = "Toggle Sidebar"
7880 >
79- < MediaEject className = { twMerge ( 'h-8 w-8 rotate-90' , isSidebarOpen && '-rotate-90' ) } />
80- </ button >
81+ < button
82+ className = { twMerge (
83+ 'group absolute -right-8 top-[45%] z-20 opacity-30 transition-all duration-300 ease-in-out hover:opacity-100 group-hover/sidebar:opacity-100' ,
84+ isSidebarOpen && '-right-4' ,
85+ ) }
86+ onClick = { ( ) => settingStore . toggleSideBar ( ) }
87+ >
88+ < MediaEject className = { twMerge ( 'h-8 w-8 rotate-90' , isSidebarOpen && '-rotate-90' ) } />
89+ </ button >
90+ </ KeyboardTooltip >
8191 </ nav >
8292 )
8393}
You can’t perform that action at this time.
0 commit comments