import { ThemeProvider, type ThemeProviderProps } from '@wise/components-theming'; import { ChevronRight, Freeze } from '@transferwise/icons'; import { Flag } from '@wise/art'; import SentimentSurface from '../../sentimentSurface'; import Header from '../../header'; import Button from '../Button'; interface GenerateSurfaceVariantProps { theme?: 'forest-green' | 'bright-green' | 'dark'; sentiment: 'success' | 'warning' | 'negative' | 'neutral' | 'proposition'; } export const generateSurfaceVariant = ({ theme, sentiment }: GenerateSurfaceVariantProps) => ({ storyName: '', render: () => { const PERMUTATIONS = { emphasis: ['base', 'elevated'] as const, disabled: [false, true] as const, others: [ { addonStart: { type: 'avatar' as const, value: [{ asset: }] }, addonEnd: { type: 'icon' as const, value: }, }, { addonStart: { type: 'avatar' as const, value: [{ profileName: 'John Doe' }] }, }, { addonStart: { type: 'avatar' as const, value: [ { asset: , }, { asset: }, ], }, }, { loading: true, }, ], priority: ['primary', 'secondary', 'secondary-neutral', 'tertiary'] as const, }; const story = PERMUTATIONS.emphasis.map((emphasis) => ( {PERMUTATIONS.disabled.map((disabled) => PERMUTATIONS.others.map((media, mediaVariant) => PERMUTATIONS.priority.map((priority) => (
)), ), )}
)); if (theme === 'dark') { return (
{story}
{story}
); } const personalVariant = (theme || 'personal') as ThemeProviderProps['theme']; const businessVariant = ( theme ? (`business--${theme}` as const) : 'business' ) as ThemeProviderProps['theme']; const platformVariant = ( theme ? (`platform--${theme}` as const) : 'platform' ) as ThemeProviderProps['theme']; return (
{story}
{story} {theme === 'bright-green' ? null : (
{story} )}
); }, decorators: [ (Story: React.ComponentType) => (
), ], });