import { Meta, StoryObj } from '@storybook/react-webpack5'; import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator'; import Logo, { LogoType } from '..'; import { LogoFormat } from '../Logo'; import type { LogoSize } from '../Logo'; import { withVariantConfig } from '../../../.storybook/helpers'; import Body from '../../Body'; const meta: Meta = { component: Logo, tags: ['!autodocs', '!manifest'], title: 'Content/Logo/Tests', }; export default meta; type Story = StoryObj; const AllVariants = () => (
{Object.values(LogoType).map((type) => (
))}
); export const Themes: Story = { render: () => , ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green'], { parameters: { padding: '', }, }), }; export const Responsive: Story = { render: () => , ...withVariantConfig(['mobile']), }; const sizes: LogoSize[] = [16, 18, 20, 24, 28, 36]; export const Sizes = () => (
{(['compact', 'full'] as const).map((display) => (
{sizes.map((size) => (
{size}
))}
))} {[LogoType.WISE_BUSINESS, LogoType.WISE_PLATFORM].map((type) => [LogoFormat.PRIMARY_LOCKUP, LogoFormat.SECONDARY_LOCKUP].map((format) => (
{sizes.map((size) => (
{size}
))}
)), )}
); const rtlSizes: LogoSize[] = [16, 20, 24, 36]; export const RTLDiff: Story = { render: () => ( <>
{rtlSizes.map((size) => ( ))}
{rtlSizes.map((size) => ( ))}
{Object.values(LogoType).map((type) => ( ))} {Object.values(LogoType).map((type) => ( ))} ), ...withRTLDiff(), };