Skip to content

Commit

Permalink
add white option for sidebar hamburger
Browse files Browse the repository at this point in the history
  • Loading branch information
nl32 committed Oct 22, 2024
1 parent 5945979 commit bcf9f13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/components/nav/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import { api } from '@src/trpc/server';
import NewSidebar from './Slide';

// Keep in mind that in all routes we need pl-72 for the sidebar
const Sidebar = async () => {
const Sidebar = async ({ hamburger }: { hamburger?: 'white' | 'black' }) => {
const userSidebarCapabilities =
await api.userMetadata.getUserSidebarCapabilities();
return <NewSidebar userCapabilities={userSidebarCapabilities} />;
return (
<NewSidebar
userCapabilities={userSidebarCapabilities}
hamburger={hamburger ?? 'black'}
/>
);
};

export default Sidebar;
4 changes: 3 additions & 1 deletion src/components/nav/Slide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ import NavMenu from './NavMenu';
import { type personalCats } from '@src/constants/categories';
const NewSidebar = ({
userCapabilities,
hamburger,
}: {
userCapabilities: Array<(typeof personalCats)[number]>;
hamburger: 'white' | 'black';
}) => {
return (
<Dialog.Root>
<Dialog.Trigger asChild>
<button className="text-black-500 px-3 py-1">
<svg
className={' h-7 w-7 fill-black'}
className={` h-7 w-7 fill-${hamburger}`}
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
Expand Down

0 comments on commit bcf9f13

Please sign in to comment.