--- import MarkdownSource from './MarkdownSource.astro' import { markdownTable } from '@shared/lib/markdown-source' interface Props { colors: Record } const { colors }: Props = Astro.props // The .md mirror gets the palette as a table; hex values are listed only when // the data has real ones (the gray scale points at a CSS variable instead). const list = Object.values(colors) const withHex = list.some((color) => color.hex?.startsWith('#')) const markdown = markdownTable( ['Color', 'CSS variable', ...(withHex ? ['Hex'] : [])], list.map((color) => [color.title, `\`${color.prop}\``, ...(withHex ? [color.hex?.startsWith('#') ? `\`${color.hex}\`` : ''] : [])]), ) ---
{ list.map((color) => { return (
{color.title}
) }) }