({
children,
orientation = 'horizontal',
}: StackProps)
| 5 | }; |
| 6 | |
| 7 | export default function Stack({ |
| 8 | children, |
| 9 | orientation = 'horizontal', |
| 10 | }: StackProps) { |
| 11 | const orientationStyles: Record<StackProps['orientation'], CSSProperties> = { |
| 12 | horizontal: { |
| 13 | display: 'flex', |
| 14 | flexDirection: 'row', |
| 15 | gap: '1rem', |
| 16 | }, |
| 17 | vertical: { |
| 18 | display: 'flex', |
| 19 | flexDirection: 'column', |
| 20 | gap: '1rem', |
| 21 | }, |
| 22 | }; |
| 23 | |
| 24 | return <div style={{ ...orientationStyles[orientation] }}>{children}</div>; |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected