import React from 'react'; import { optionsKnob, text, withKnobs } from '@storybook/addon-knobs'; import { Description, Divider, Wrapper } from '../../..'; import { textColors } from '../../util/global-props'; import { OptionsKnobRecord } from '../../util/knobs'; import { Title, TitlePropsType } from './title.component'; export default { title: 'GEENEE-UI/Text', component: Title, decorators: [ withKnobs ] }; const titleSize: OptionsKnobRecord = { default: undefined, xxl: 'xxl', xl: 'xl', lg: 'lg', md: 'md', sm: 'sm', xs: 'xs', xxs: 'xxs' }; const titleSizes = Object.keys(titleSize) as TitlePropsType['size'][]; const titleAlign: OptionsKnobRecord = { default: undefined, left: 'left', center: 'center', right: 'right' }; const titleWeight: OptionsKnobRecord = { default: undefined, bold: 'bold', regular: 'regular' }; const titleColor: OptionsKnobRecord = { default: undefined, ...textColors }; export const _Title = () => ( Title { titleSizes.map((size, index) => ( { size } { text('04. Text', 'Some example text here') } )) } );