import {Card, Content, Link, Text} from '@react-spectrum/s2'; import Download from '@react-spectrum/s2/icons/Download'; import {ReactNode} from 'react'; import {spawnSync} from 'child_process'; import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; const gitHash = process.env.GIT_HASH || spawnSync('git', ['rev-parse', '--short', 'HEAD']).stdout.toString().trim(); const preview = style({ height: 'calc(100% + var(--card-padding-y) * 2)', aspectRatio: 'square', contain: 'strict', marginStart: 'calc(var(--card-padding-x) * -1)', marginEnd: '--card-padding-x', marginY: 'calc(var(--card-padding-y) * -1)' }); function StarterCard({ zip, previewHref, title, children }: { zip: string; previewHref: string; title: string; children: ReactNode; }) { return (
{children} {title} Download ZIP
Preview
); } const vanillaIcon = ( ); const tailwindIcon = ( ); function VanillaStarterCard() { return ( {vanillaIcon} ); } function TailwindStarterCard() { return ( {tailwindIcon} ); } function HooksStarterCard() { return ( {vanillaIcon} ); } const section = style({display: 'flex', gap: 16, flexWrap: 'wrap'}); export function StarterKits() { return (
); } // Just the hooks starter, for the Hooks guide page. export function HooksStarterKit() { return (
); }