import { Story, Meta } from '@storybook/react' import { DividerIndent, DividerProps, DividerType, DividerTypes } from './types' import Divider from './Divider' import styled from 'styled-components' const getOptions = (enumObject: Record) => Object.values(enumObject).filter((value) => typeof value === 'string') export default { component: Divider, title: 'Layout/Divider', args: { type: 'horizontal', indents: 'md', }, argTypes: { type: { options: getOptions(DividerType), control: 'inline-radio', }, indents: { options: getOptions(DividerIndent), control: 'inline-radio', }, }, } as Meta const Wrapper = styled.div<{ $type?: DividerTypes }>` flex-direction: ${({ $type }) => ($type === 'vertical' ? 'row' : 'column')}; display: flex; ` export const Base: Story = (props) => ( First Second Third )