import { ComponentWithAs, Flex } from '@chakra-ui/react'; import { ComponentStory, Meta } from '@storybook/react'; import { theme } from '../../modules/theme'; import { Props } from './types'; import { TYPOGRAPHY_STYLES, Typography } from '.'; export default { title: 'Foundations/Typography', component: Typography, } as Meta; // const formatSize = (value: string) => { // return +value.replace('rem', '') * 4 * 4; // }; const Template: ComponentStory = () => { return ( {Object.entries(TYPOGRAPHY_STYLES).map(([k, v]) => { const sizes = TYPOGRAPHY_STYLES[k as keyof typeof TYPOGRAPHY_STYLES]; return Object.keys(v).map((it) => { // const css = sizes[it as keyof typeof sizes]; // const fontFamily = css.fontFamily; // const letterSpacing = (css as any).letterSpacing?.replace('em', ''); return ( {k}   {it} ); }); })} ); }; export const Default: ComponentStory> = Template.bind({});