import { define } from 'forge' import { theme } from './theme' import { VStack, HStack } from './stack' import { Button } from './button' import { Section } from './section' import { H2, H3 } from './text' export const Grid = define('Grid', { display: 'grid', variants: { cols: { 1: { gridTemplateColumns: 'repeat(1, minmax(0, 1fr))' }, 2: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' }, 3: { gridTemplateColumns: 'repeat(3, minmax(0, 1fr))' }, 4: { gridTemplateColumns: 'repeat(4, minmax(0, 1fr))' }, 5: { gridTemplateColumns: 'repeat(5, minmax(0, 1fr))' }, 6: { gridTemplateColumns: 'repeat(6, minmax(0, 1fr))' }, 7: { gridTemplateColumns: 'repeat(7, minmax(0, 1fr))' }, }, gap: { 0: { gap: 0 }, 1: { gap: theme('spacing-1') }, 2: { gap: theme('spacing-2') }, 3: { gap: theme('spacing-3') }, 4: { gap: theme('spacing-4') }, 6: { gap: theme('spacing-6') }, 8: { gap: theme('spacing-8') }, 12: { gap: theme('spacing-12') }, }, v: { start: { alignItems: 'start' }, center: { alignItems: 'center' }, end: { alignItems: 'end' }, stretch: { alignItems: 'stretch' }, }, h: { start: { justifyItems: 'start' }, center: { justifyItems: 'center' }, end: { justifyItems: 'end' }, stretch: { justifyItems: 'stretch' }, }, }, }) export const Test = () => { return (

Grid Examples

{/* Simple 3-column grid */}

Simple 3 columns: cols={3}

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
{/* 4-column grid */}

4 columns: cols={4}

Card 1
Card 2
Card 3
Card 4
{/* Payment method example */}

Payment buttons example

{/* Alignment examples */}

Alignment: v="center" h="center"

Item 1
Item 2
Item 3

Alignment: v="start" h="end"

Left
Right
) }