refactor(ui): switch surfaces to shared shadow tokens
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export const APP_HEADER_SURFACE_CLASSES =
|
||||
"mb-6 flex min-h-14 items-center justify-between gap-3 border-b border-foreground/10 bg-background/95 px-4 py-3 sm:px-6";
|
||||
"mb-6 flex min-h-14 items-center justify-between gap-3 bg-background/95 px-4 py-3 shadow-[inset_0_-1px_0_0_var(--color-border)] sm:px-6";
|
||||
|
||||
export const APP_SECTION_SURFACE_CLASSES =
|
||||
"rounded-[10px] bg-card px-4 py-4 shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_2px_2px_rgba(0,0,0,0.04),0_0_0_1px_#fafafa] sm:px-5";
|
||||
"rounded-[10px] bg-card px-4 py-4 shadow sm:px-5";
|
||||
|
||||
export const APP_ACTION_BAR_CLASSES =
|
||||
"rounded-[10px] bg-card px-3 py-3 shadow-[0_0_0_1px_rgba(0,0,0,0.08)]";
|
||||
"rounded-[10px] bg-secondary px-3 py-3 shadow-sm";
|
||||
|
||||
export const APP_NAV_SURFACE_CLASSES =
|
||||
"fixed inset-x-4 bottom-4 mx-auto flex max-w-3xl items-center justify-between rounded-[10px] bg-background/95 px-3 py-2 shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_24px_rgba(0,0,0,0.08)] sm:inset-x-6 lg:hidden";
|
||||
"fixed inset-x-4 bottom-4 mx-auto flex max-w-3xl items-center justify-between rounded-[10px] bg-card/95 px-3 py-2 shadow-lg sm:inset-x-6 lg:hidden";
|
||||
|
||||
const CONNECTION_BADGE_BASE_CLASSES =
|
||||
"gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium shadow-[0_0_0_1px_rgba(0,0,0,0.08)]";
|
||||
"gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium shadow-sm";
|
||||
|
||||
export const getConnectionBadgeClasses = (isOnline: boolean) =>
|
||||
cn(
|
||||
CONNECTION_BADGE_BASE_CLASSES,
|
||||
isOnline
|
||||
? "bg-[#ebf5ff] text-[#0068d6]"
|
||||
: "bg-muted text-muted-foreground",
|
||||
isOnline ? "bg-[#ebf5ff] text-[#0068d6]" : "bg-muted text-muted-foreground",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user