import { define } from 'forge' import { theme } from './theme' export const Section = define('Section', { display: 'flex', flexDirection: 'column', padding: theme('spacing-6'), variants: { 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') }, }, }, }) export const Test = () => { return (
This is a section with default styling
It has padding and vertical spacing between children
This section has a smaller gap (4)
Items are closer together
This section has a larger gap (12)
Items have more breathing room
This section has a max width of 600px and a gray background
Good for centering content on wide screens