Added Basic Darkmode and Fixed Small Bugs

This commit is contained in:
Ahmad 2025-01-13 19:12:06 -05:00
parent aacca3d141
commit 94fb5c7eb1
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
42 changed files with 593 additions and 72 deletions

View file

@ -6,10 +6,11 @@ import { Button } from '@/components/ui/button';
import { FormPopover } from '@/components/form/form-popover';
import { MobileSidebar } from './mobile-sidebar';
import { ModeToggle } from '@/components/ui/mode-toggle';
export const Navbar = () => {
return (
<nav className='fixed top-0 z-50 flex h-14 w-full items-center border-b bg-white px-4 shadow-sm'>
<nav className='fixed top-0 z-50 flex h-14 w-full items-center border-b bg-white px-4 shadow-sm dark:bg-black'>
<MobileSidebar />
<div className='flex items-center gap-x-4'>
<div className='hidden md:flex'>
@ -60,6 +61,7 @@ export const Navbar = () => {
},
}}
/>
<ModeToggle />
</div>
</nav>
);

View file

@ -68,8 +68,10 @@ export const NavItem = ({
<AccordionTrigger
onClick={() => onExpand(organization.id)}
className={cn(
'flex items-center gap-x-2 rounded-md p-1.5 text-start text-neutral-700 no-underline transition hover:bg-neutral-500/10 hover:no-underline',
isActive && !isExpanded && 'bg-sky-500/10 text-sky-700'
'flex items-center gap-x-2 rounded-md p-1.5 text-start text-neutral-700 no-underline transition hover:bg-neutral-500/10 hover:no-underline dark:text-neutral-200 dark:hover:bg-neutral-200/10',
isActive &&
!isExpanded &&
'bg-sky-500/10 text-sky-700 dark:bg-sky-300/10 dark:text-sky-600'
)}
>
<div className='flex items-center gap-x-2'>
@ -84,7 +86,7 @@ export const NavItem = ({
<span className='text-sm font-medium'>{organization.name}</span>
</div>
</AccordionTrigger>
<AccordionContent className='pt-1 text-neutral-700'>
<AccordionContent className='pt-1 text-neutral-700 dark:text-neutral-200'>
{routes.map((route) => (
<Button
key={route.href}
@ -92,7 +94,8 @@ export const NavItem = ({
onClick={() => onClick(route.href)}
className={cn(
'mb-1 w-full justify-start pl-10 font-normal',
pathname === route.href && 'bg-sky-500/10 text-sky-700'
pathname === route.href &&
'bg-sky-500/10 text-sky-700 dark:bg-sky-300/10 dark:text-sky-600'
)}
variant='ghost'
>