update dep + card styles

This commit is contained in:
Purp1e
2024-10-28 15:05:56 +08:00
parent 3d027ec05f
commit 16bc1f55a2
3 changed files with 17 additions and 17 deletions

View File

@@ -16,21 +16,21 @@ export default function PreferenceLayout({ children }: { children: React.ReactNo
<CardIcon
type="menu"
onClick={() => router.push("/preference/general")}
className={clsx(pathname === "/preference/general" && "bg-white/60")}
className={clsx(pathname === "/preference/general" && "bg-black/5")}
>
<SettingConfig />
</CardIcon>
<CardIcon
type="menu"
onClick={() => router.push("/preference/path")}
className={clsx(pathname === "/preference/path" && "bg-white/60")}
className={clsx(pathname === "/preference/path" && "bg-black/5")}
>
<AssemblyLine />
</CardIcon>
<CardIcon
type="menu"
onClick={() => router.push("/preference/replay")}
className={clsx(pathname === "/preference/replay" && "bg-white/60")}
className={clsx(pathname === "/preference/replay" && "bg-black/5")}
>
<Videocamera />
</CardIcon>

View File

@@ -11,7 +11,7 @@ interface CardProps {
const Card = ({ children }: CardProps) => {
return (
<div
className="dark:from-black/10 dark:to-black/5 dark:border-white/[6%] px-4 pt-3 pb-4 flex flex-col gap-2 border w-full rounded-lg bg-white/40 border-black/[6%]"
className="dark:from-black/10 dark:to-black/5 dark:border-white/[6%] px-3 pt-3 pb-4 flex flex-col gap-2.5 border w-full rounded-lg bg-white/40 border-black/[6%]"
data-tauri-drag-region
>
{children}
@@ -25,7 +25,7 @@ const CardHeader = ({ children }: CardProps) => {
const CardIcon = ({ children, type, className, ...rest }: CardProps) => {
return (
<div className={clsx("flex gap-1.5 items-center font-semibold", type === "menu" && "transition cursor-pointer hover:bg-white/60 px-2 py-1 rounded-md active:scale-95", className)} {...rest}>
<div className={clsx("flex gap-1.5 items-center font-semibold", type === "menu" && "transition cursor-pointer hover:bg-black/5 px-2 py-1 rounded-md active:scale-95", className)} {...rest}>
{children}
</div>
)