import { define } from '@because/forge' import { theme } from './theme' import { Section } from './section' import { H2 } from './text' import { VStack } from './stack' export const Divider = define('Divider', { display: 'flex', alignItems: 'center', margin: `${theme('spacing-4')} 0`, parts: { Line: { flex: 1, borderTop: `1px solid ${theme('colors-border')}`, }, Text: { base: 'span', padding: `0 ${theme('spacing-3')}`, fontSize: theme('fontSize-sm'), color: theme('colors-fgMuted'), background: theme('colors-bg'), }, }, render({ props, parts: { Root, Line, Text } }) { const { children, ...rest } = props return ( {children && ( <> {children} )} ) }, }) export const Test = () => { return (

Divider Examples

Would you like to continue

OR WOULD YOU LIKE TO

Submit to certain death

{/* Just a line */}

Look a line

So cool, so straight!

) }