"use client" import { Badge } from "@/components/ui/badge" import { useMaterial } from "@/contexts/material-context" import { cn } from "@/lib/utils" import { SectionHeading } from "@/components/ui/section-heading" interface ColorPaletteProps { minimal?: boolean } export function ColorPaletteSection({ minimal = false }: ColorPaletteProps) { const { selectedMaterial, getThemeAwareClass } = useMaterial() const materialClass = selectedMaterial ? getThemeAwareClass(selectedMaterial) : "" // Define our color categories const colorCategories = [ { name: "Grays", colors: [ { name: "Slate", key: "slate" }, { name: "Gray", key: "gray" }, { name: "Zinc", key: "zinc" }, { name: "Neutral", key: "neutral" }, { name: "Stone", key: "stone" }, ], }, { name: "Reds", colors: [ { name: "Red", key: "red" }, { name: "Rose", key: "rose" }, { name: "Pink", key: "pink" }, ], }, { name: "Oranges", colors: [ { name: "Orange", key: "orange" }, { name: "Amber", key: "amber" }, ], }, { name: "Yellows", colors: [ { name: "Yellow", key: "yellow" }, { name: "Lime", key: "lime" }, ], }, { name: "Greens", colors: [ { name: "Green", key: "green" }, { name: "Emerald", key: "emerald" }, { name: "Teal", key: "teal" }, ], }, { name: "Blues", colors: [ { name: "Cyan", key: "cyan" }, { name: "Sky", key: "sky" }, { name: "Blue", key: "blue" }, { name: "Indigo", key: "indigo" }, ], }, { name: "Purples", colors: [ { name: "Violet", key: "violet" }, { name: "Purple", key: "purple" }, { name: "Fuchsia", key: "fuchsia" }, ], }, ] // Define the shades we want to display const shades = [500, 600, 700] // If minimal is true, return a simplified version if (minimal) { return (

Color Palette

{colorCategories.map((category) => category.colors.map((color) => ( {color.name} )), )}
) } return (
{colorCategories.map((category) => (

{category.name}

{category.colors.map((color) => (

{color.name}

{shades.map((shade) => (
{shade} {`var(--${color.key}-${shade})`}
))}
))}
))}

Badge Examples

{colorCategories.map((category) => (

{category.name}

{category.colors.map((color) => ( {color.name} ))}
))}
) }