export const layout = ['inline', 'stacked'] as const;
export type Layout = typeof layout[number];

// Then it can be used in React props

interface Props {
  layout: Layout;
}

const Component = ({ layout }: Props) => (
   <div style={{ display: 'flex', flexDirection: layout === 'inline' ? 'column' : 'row' }}></div>
)

// Storybook uses the layout array
export default {
  title: 'Component',
  argTypes: { layout: { options: layout } }
}