import { Meta, StoryObj } from '@storybook/react-webpack5'; import { Camera, Convert, FastFlag, Graph, Leaf, Money, PlusCircle, Rewards, } from '@transferwise/icons'; import AvatarView from '.'; import { getBrandColorFromSeed, getInitials, ProfileType } from '../common'; import Display from '../display'; import { withVariantConfig } from '../../.storybook/helpers'; const meta: Meta = { component: AvatarView, tags: ['!autodocs', '!manifest'], title: 'Content/AvatarView/Tests', }; export default meta; type Story = StoryObj; const profileName1 = 'Wolter White'; const profileName2 = 'Tyler Durden'; export const EdgeInstances: Story = { render: () => { const css = `.custom-variant { border: 1px dashed var(--color-border-neutral); }`; return (
{null} {getInitials(profileName1)} {getInitials(profileName1)} {getInitials(profileName1)} {getInitials(profileName1)} 9+ 5+
); }, }; export const ProfileBrokenImageFallback: Story = { parameters: { chromatic: { delay: 5000, }, }, render: () => { const assetUrl = 'https://test.com/img-wrong-url.test'; return ( <> ); }, }; /** Badge types across default and dark themes to verify icon color visibility. */ export const BadgeVariants: Story = { render: function Render() { return (
}}> }} />
}}> }} />
}}> }}>
), }} />
), }} /> ); }, ...withVariantConfig(['default', 'dark']), };