diff --git a/client/src/app/test/header-card/page.tsx b/client/src/app/test/header-card/page.tsx new file mode 100644 index 0000000..b768a18 --- /dev/null +++ b/client/src/app/test/header-card/page.tsx @@ -0,0 +1,16 @@ +import { HeaderCard } from "@/components/ui/header-card"; + +export default function TestHeaderCardPage() { + return ( +
+
+
+ + + + +
+
+
+ ); +} diff --git a/client/src/components/ui/header-card.tsx b/client/src/components/ui/header-card.tsx new file mode 100644 index 0000000..09651a0 --- /dev/null +++ b/client/src/components/ui/header-card.tsx @@ -0,0 +1,68 @@ +"use client"; + +import { Building, Calendar, ClipboardList, Users } from "lucide-react"; + +import { cn } from "@/lib/utils"; + +interface HeaderCardProps { + value: number | string; + label: string; + variant: "rooms" | "bookings" | "weekly" | "users"; +} + +// Variant colors and icons mapping +const variantMap = { + rooms: { + color: "#F3D03A", // Yellow + Icon: Building, + }, + bookings: { + color: "#67D4EC", // Primary blue + Icon: Calendar, + }, + weekly: { + color: "#BE1B3B", // Bloom red + Icon: ClipboardList, + }, + users: { + color: "#2332FF", // Orbit blue + Icon: Users, + }, +}; + +/** + * HeaderCard – A statistic card with accent bar, value, label, and icon. + */ +export function HeaderCard({ value, label, variant }: HeaderCardProps) { + const config = variantMap[variant]; + const Icon = config.Icon; + + return ( +
+ {/* Accent bar */} +
+ + {/* Value + label */} +
+ {value} + {label} +
+ + {/* Icon */} +
+ +
+
+ ); +}