Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/settings -> /chats Page (Theme / Accent Color) #240

Open
Gamius00 opened this issue Jun 17, 2024 · 0 comments
Open

/settings -> /chats Page (Theme / Accent Color) #240

Gamius00 opened this issue Jun 17, 2024 · 0 comments
Assignees

Comments

@Gamius00
Copy link
Collaborator

Gamius00 commented Jun 17, 2024

  • User can change the Theme and Accent Color
image

Example Code Mode Toggle

"use client";

import { Button } from "~/components/ui/button";
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "~/components/ui/dropdown-menu";
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import * as React from "react";

export function ModeToggle() {
  const { setTheme } = useTheme();

  return (
    <DropdownMenu>
      <DropdownMenuTrigger asChild>
        <Button variant="outline" size="icon">
          <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
          <Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
          <span className="sr-only">Toggle theme</span>
        </Button>
      </DropdownMenuTrigger>
      <DropdownMenuContent align="end">
        <DropdownMenuItem onClick={() => setTheme("light")}>
          Light
        </DropdownMenuItem>
        <DropdownMenuItem onClick={() => setTheme("dark")}>
          Dark
        </DropdownMenuItem>
        <DropdownMenuItem onClick={() => setTheme("system")}>
          System
        </DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
  );
}
@Gamius00 Gamius00 moved this to Todo in Chat.io project Jun 17, 2024
@Gamius00 Gamius00 self-assigned this Jun 17, 2024
@FleetAdmiralJakob FleetAdmiralJakob changed the title Chats Page Settings/Chats Page (Theme / Accent Color) Nov 27, 2024
@FleetAdmiralJakob FleetAdmiralJakob changed the title Settings/Chats Page (Theme / Accent Color) /settings -> /chats Page (Theme / Accent Color) Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant