Browse Source

收缩按钮隐藏

master
ma-zhongxu 10 months ago
parent
commit
8d90da7f65
  1. 54
      frontend/src/components/Sidebar/SidebarToggle/index.jsx

54
frontend/src/components/Sidebar/SidebarToggle/index.jsx

@ -73,33 +73,33 @@ export function ToggleSidebarButton({ showSidebar, setShowSidebar }) {
return ( return (
<> <>
<button
type="button"
className={`hidden md:block border-none bg-transparent outline-none ring-0 transition-left duration-500 ${showSidebar ? "left-[247px]" : "absolute top-[20px] left-[30px] z-10"}`}
onClick={() => setShowSidebar((prev) => !prev)}
data-tooltip-id="sidebar-toggle"
data-tooltip-content={
showSidebar
? `Hide Sidebar (${shortcut})`
: `Show Sidebar (${shortcut})`
}
aria-label={
showSidebar
? `Hide Sidebar (${shortcut})`
: `Show Sidebar (${shortcut})`
}
>
<SidebarSimple
className="text-theme-text-secondary hover:text-theme-text-primary"
size={24}
/>
</button>
<Tooltip
id="sidebar-toggle"
place="top"
delayShow={300}
className="tooltip !text-xs z-99"
/>
{/*<button*/}
{/* type="button"*/}
{/* className={`hidden md:block border-none bg-transparent outline-none ring-0 transition-left duration-500 ${showSidebar ? "left-[247px]" : "absolute top-[20px] left-[30px] z-10"}`}*/}
{/* onClick={() => setShowSidebar((prev) => !prev)}*/}
{/* data-tooltip-id="sidebar-toggle"*/}
{/* data-tooltip-content={*/}
{/* showSidebar*/}
{/* ? `Hide Sidebar (${shortcut})`*/}
{/* : `Show Sidebar (${shortcut})`*/}
{/* }*/}
{/* aria-label={*/}
{/* showSidebar*/}
{/* ? `Hide Sidebar (${shortcut})`*/}
{/* : `Show Sidebar (${shortcut})`*/}
{/* }*/}
{/*>*/}
{/* <SidebarSimple*/}
{/* className="text-theme-text-secondary hover:text-theme-text-primary"*/}
{/* size={24}*/}
{/* />*/}
{/*</button>*/}
{/*<Tooltip*/}
{/* id="sidebar-toggle"*/}
{/* place="top"*/}
{/* delayShow={300}*/}
{/* className="tooltip !text-xs z-99"*/}
{/*/>*/}
</> </>
); );
} }
Loading…
Cancel
Save