-
Notifications
You must be signed in to change notification settings - Fork 0
issue54 Add HeaderCard component with 4 variants using Bloom color palette #74
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { HeaderCard } from "@/components/ui/header-card"; | ||
|
|
||
| export default function TestHeaderCardPage() { | ||
| return ( | ||
| <div className="min-h-screen bg-gray-50 p-8"> | ||
| <div className="mx-auto max-w-7xl"> | ||
| <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4"> | ||
| <HeaderCard value={5} label="Total Meeting Rooms" variant="rooms" /> | ||
| <HeaderCard value={20} label="Total Bookings" variant="bookings" /> | ||
| <HeaderCard value={2} label="Weekly Bookings" variant="weekly" /> | ||
| <HeaderCard value={3} label="Total Users" variant="users" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -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 | ||||||
|
||||||
| color: "#67D4EC", // Primary blue | |
| color: "var(--bloom-blue)", // Primary blue |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded hex color #BE1B3B doesn't match the Bloom red color defined in the CSS variables (#be1b3bff). The CSS variable defines the color as #be1b3bff (with alpha channel), while this uses #BE1B3B. Consider using Tailwind's bg-bloom-red class or the CSS variable var(--bloom-red) for consistency with the rest of the codebase.
| color: "#BE1B3B", // Bloom red | |
| color: "var(--bloom-red)", // Bloom red |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded hex color #2332FF doesn't match the Bloom orbit color defined in the CSS variables (#2332ffff). The CSS variable defines the color as #2332ffff (with alpha channel), while this uses #2332FF. Consider using Tailwind's bg-bloom-orbit class or the CSS variable var(--bloom-orbit) for consistency with the rest of the codebase.
| color: "#2332FF", // Orbit blue | |
| color: "var(--bloom-orbit)", // Orbit blue (from CSS variable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to take props: color and icon, instead of variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file name can be dashboard-card
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded hex color #E5E1E6 for the border doesn't match the Bloom gray color defined in the CSS variables (#e5e1e6ff). Consider using Tailwind's border-bloom-gray class or the CSS variable var(--bloom-gray) for consistency with the rest of the codebase.
| "border border-[#E5E1E6]", // Bloom gray border | |
| "border border-bloom-gray", // Bloom gray border |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The icon is purely decorative and should have aria-hidden="true" to prevent screen readers from announcing it, since the meaning is already conveyed by the label text.
| <Icon className="h-5 w-5" style={{ color: config.color }} /> | |
| <Icon className="h-5 w-5" style={{ color: config.color }} aria-hidden="true" /> |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The card component lacks proper semantic HTML structure and ARIA attributes. Consider wrapping this in a <article> or <section> tag, and add role="region" with aria-labelledby pointing to the label for better screen reader support. Additionally, the value should be announced properly by screen readers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded hex color
#F3D03Adoesn't match the Bloom yellow color defined in the CSS variables (#f3d03aff). The CSS variable defines the color as#f3d03aff(with alpha channel), while this uses#F3D03A. Consider using Tailwind'sbg-bloom-yellowclass or the CSS variablevar(--bloom-yellow)for consistency with the rest of the codebase.