feat: appearance theme support system config

This commit is contained in:
hehehai
2024-05-23 17:41:24 +08:00
parent 2362130927
commit 422187cd4b
11 changed files with 39 additions and 47 deletions

View File

@@ -8,7 +8,7 @@ export const ProjectLayout = ({ children }: Props) => {
return (
<div>
<div
className="bg-radial relative flex flex-col bg-background pt-6"
className="bg-radial relative flex flex-col bg-background"
id="app-container"
>
<div className="flex items-center justify-center">

View File

@@ -97,12 +97,12 @@ interface NavProps {
export const Nav = ({ links }: NavProps) => {
const router = useRouter();
console.log(router.pathname, links);
return (
<div className="group flex flex-col gap-4 py-2 data-[collapsed=true]:py-2 ">
<nav className="grid gap-1 px-2 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2">
{links.map((link, index) => {
const isActive = router.pathname === link.href;
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
return (
<Link
key={index}
@@ -110,7 +110,7 @@ export const Nav = ({ links }: NavProps) => {
className={cn(
buttonVariants({ variant: "ghost", size: "sm" }),
isActive &&
"dark:bg-muted dark:text-white dark:hover:bg-muted dark:hover:text-white",
"dark:bg-muted dark:text-white dark:hover:bg-muted dark:hover:text-white bg-muted",
"justify-start",
)}
>