diff --git a/docs/src/components/Color.astro b/docs/src/components/Color.astro new file mode 100644 index 0000000..3a99361 --- /dev/null +++ b/docs/src/components/Color.astro @@ -0,0 +1,74 @@ +--- +import { type Color } from '@/lib/colors' + +export interface Props { + color: Color +} +const { color } = Astro.props +--- + + diff --git a/docs/src/components/ColorFormatSelector.astro b/docs/src/components/ColorFormatSelector.astro new file mode 100644 index 0000000..ec23abb --- /dev/null +++ b/docs/src/components/ColorFormatSelector.astro @@ -0,0 +1,186 @@ +--- +import { getColorFormat, type Color } from '@/lib/colors' +import { cn } from '@/lib/utils' + +export interface Props { + class?: string + color: Color +} + +const { color, class: className } = Astro.props + +const formats = getColorFormat(color) + +const options = Object.entries(formats).map(([format, title]) => ({ value: format, title, format })) +--- + +