mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-20 18:40:17 -04:00
Minor code formatting
This commit is contained in:
parent
f78973e974
commit
b15c8b9e57
|
@ -31,21 +31,24 @@ const Sidebar: React.FC<SidebarProps> = ({
|
||||||
{/* Button to open the sidebar. */}
|
{/* Button to open the sidebar. */}
|
||||||
<button
|
<button
|
||||||
onClick={() => setIsSidebarOpen(true)}
|
onClick={() => setIsSidebarOpen(true)}
|
||||||
className={`fixed z-20 p-2 text-gray-500 hover:text-gray-800 left-0`}
|
className={
|
||||||
|
"fixed z-20 p-2 text-gray-500 hover:text-gray-800 left-0"
|
||||||
|
}
|
||||||
aria-label={"Open sidebar"}
|
aria-label={"Open sidebar"}
|
||||||
>
|
>
|
||||||
{!isSidebarOpen && (
|
{!isSidebarOpen && (
|
||||||
<ChevronDoubleRightIcon className="h-5 w-5" />
|
<ChevronDoubleRightIcon className="h-5 w-5" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* The sidebar itself. */}
|
{/* The sidebar itself. */}
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
"fixed left-0 w-64 h-full border border-gray-200 bg-gray-50 px-4 " +
|
"fixed left-0 w-64 h-full border border-gray-200 bg-gray-50 px-4 " +
|
||||||
(isSidebarOpen
|
(isSidebarOpen
|
||||||
? "translate-x-0"
|
? "translate-x-0" // Open
|
||||||
: "-translate-x-full opacity-25") +
|
: "-translate-x-full opacity-25") + // Closed
|
||||||
" transition duration-300 ease-in-out"
|
" transition duration-300 ease-out" // More animation properties
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{/* Button to close sidebar */}
|
{/* Button to close sidebar */}
|
||||||
|
@ -58,6 +61,7 @@ const Sidebar: React.FC<SidebarProps> = ({
|
||||||
<ChevronDoubleLeftIcon className="h-5 w-5" />
|
<ChevronDoubleLeftIcon className="h-5 w-5" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col space-y-8">
|
<div className="flex flex-col space-y-8">
|
||||||
{/* user + logout button */}
|
{/* user + logout button */}
|
||||||
<div className="flex items-center p-4 space-x-2 border border-gray-200 rounded-md ">
|
<div className="flex items-center p-4 space-x-2 border border-gray-200 rounded-md ">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user