--- // Port of preview/pages/buttons.html (layout: default) import DefaultLayout from '@shared/layouts/DefaultLayout.astro'; import Icon from '@shared/components/Icon.astro'; import Button from '@shared/components/Button.astro'; import site from '@data/site.json'; type ColorEntry = [string, { title: string; icon?: string }]; // Liquid iterates the site.json objects as [key, value] pairs. // themeColors/colors entries have no icon — ui/icon.html renders nothing there. const themeColors = Object.entries(site.themeColors) as ColorEntry[]; const colors = Object.entries(site.colors) as ColorEntry[]; const socialColors = Object.entries(site.socialColors) as ColorEntry[]; const actions = ['edit', 'copy', 'settings', 'clipboard', 'x']; const sizes = ['sm', 'md', 'lg', 'xl']; ---

Standard Buttons

{ themeColors.map(([name, color]) => ( {color.icon && } {color.title} )) }

Outline Buttons

{ themeColors.map(([name, color]) => ( {color.icon && } {color.title} )) }

Ghost Buttons

{ themeColors.map(([name, color]) => ( {color.icon && } {color.title} )) }

Square Buttons

{ themeColors.map(([name, color]) => ( {color.icon && } {color.title} )) }

Pill Buttons

{ themeColors.map(([name, color]) => ( {color.icon && } {color.title} )) }

Extra colors

{ colors.map(([name, color]) => ( {color.icon && } {color.title} )) }

Icon buttons

{ socialColors.map(([name, app]) => ( {app.icon && } )) }

Social colors

{ socialColors.map(([name, app]) => ( {app.icon && } {app.title} )) }

Action buttons

{ actions.map((action) => ( )) }

Buttons size

{ sizes.map((size) => (
)) }