Skip to content

Commit

Permalink
removed class from theme-toggle and added to base component
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSaterlay committed Nov 6, 2024
1 parent 48ed30e commit c38def6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions packages/frontpage/app/(app)/_components/theme-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,15 @@ export function ThemeToggleMenuGroup() {
<DropdownMenuLabel className="truncate">Theme</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuRadioGroup value={theme} onValueChange={setTheme}>
<DropdownMenuRadioItem
value="light"
className="flex gap-1.5 cursor-pointer"
>
<DropdownMenuRadioItem value="light" className="flex gap-1.5">
<SunIcon className="size-4" />
<span>Light</span>
</DropdownMenuRadioItem>
<DropdownMenuRadioItem
value="dark"
className="flex gap-1.5 cursor-pointer"
>
<DropdownMenuRadioItem value="dark" className="flex gap-1.5">
<MoonIcon className="h-[1.2rem] w-[1.2rem]" />
<span>Dark</span>
</DropdownMenuRadioItem>
<DropdownMenuRadioItem
value="system"
className="flex gap-1.5 cursor-pointer"
>
<DropdownMenuRadioItem value="system" className="flex gap-1.5">
<Half2Icon className="h-[1.2rem] w-[1.2rem]" />
<span>System</span>
</DropdownMenuRadioItem>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontpage/lib/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function DropdownMenuRadioItem({
return (
<DropdownMenuPrimitive.RadioItem
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className,
)}
{...props}
Expand Down

0 comments on commit c38def6

Please sign in to comment.