mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-02 13:07:46 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
25 lines
841 B
TypeScript
25 lines
841 B
TypeScript
import { type ColorPalette } from "@/lib/colors"
|
|
import { Color } from "@/components/color"
|
|
import { ColorFormatSelector } from "@/components/color-format-selector"
|
|
|
|
export function ColorPalette({ colorPalette }: { colorPalette: ColorPalette }) {
|
|
return (
|
|
<div id={colorPalette.name} className="scroll-mt-20 rounded-lg">
|
|
<div className="flex items-center px-4">
|
|
<div className="flex-1 pl-1 text-sm font-medium">
|
|
<h2 className="capitalize">{colorPalette.name}</h2>
|
|
</div>
|
|
<ColorFormatSelector
|
|
color={colorPalette.colors[0]}
|
|
className="ml-auto"
|
|
/>
|
|
</div>
|
|
<div className="flex flex-col gap-4 py-4 sm:flex-row sm:gap-2">
|
|
{colorPalette.colors.map((color) => (
|
|
<Color key={color.hex} color={color} />
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|