import { ComponentMeta } from '@storybook/react'; import React from 'react'; import { AlignItems, DISPLAY, TextColor, BackgroundColor, BorderColor, IconColor, } from '../../../helpers/constants/design-system'; import Box from '../../ui/box/box'; import { Icon, IconName } from '..'; import README from './README.mdx'; import { AvatarBase } from './avatar-base'; import { AvatarBaseProps, AvatarBaseSize } from './avatar-base.types'; const marginSizeKnobOptions = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 'auto', ]; export default { title: 'Components/ComponentLibrary/AvatarBase', component: AvatarBase, parameters: { docs: { page: README, }, }, argTypes: { size: { control: 'select', options: Object.values(AvatarBaseSize), }, color: { options: Object.values(TextColor), control: 'select', }, backgroundColor: { options: Object.values(BackgroundColor), control: 'select', }, borderColor: { options: Object.values(BorderColor), control: 'select', }, display: { options: Object.values(DISPLAY), control: 'select', table: { category: 'box props' }, }, marginTop: { options: marginSizeKnobOptions, control: 'select', table: { category: 'box props' }, }, marginRight: { options: marginSizeKnobOptions, control: 'select', table: { category: 'box props' }, }, marginBottom: { options: marginSizeKnobOptions, control: 'select', table: { category: 'box props' }, }, marginLeft: { options: marginSizeKnobOptions, control: 'select', table: { category: 'box props' }, }, }, args: { size: AvatarBaseSize.Md, color: TextColor.textDefault, backgroundColor: BackgroundColor.backgroundAlternative, borderColor: BorderColor.borderDefault, children: 'B', }, } as ComponentMeta; export const DefaultStory = (args: AvatarBaseProps) => ; DefaultStory.storyName = 'Default'; export const Size = (args: AvatarBaseProps) => ( ); export const Children = (args: AvatarBaseProps) => ( A ); export const ColorBackgroundColorAndBorderColor = (args: AvatarBaseProps) => ( B G S );