import { Meta, StoryObj } from '@storybook/react-webpack5'; import { ThemeProvider, type Theming } from '@wise/components-theming'; import Button from '../button'; import SentimentSurface from './SentimentSurface'; import type { Sentiment, Emphasis } from './SentimentSurface.types'; const sentiments: Sentiment[] = ['negative', 'success', 'proposition', 'warning', 'neutral']; const emphasisLevels: Emphasis[] = ['base', 'elevated']; // Themes that support light/dark screen modes const themesWithScreenModes: Theming['theme'][] = ['personal', 'business', 'platform']; // Themes that don't have light/dark variants const themesWithoutScreenModes: Theming['theme'][] = [ 'forest-green', 'bright-green', 'business--forest-green', 'business--bright-green', 'platform--forest-green', ]; const screenModes: Theming['screenMode'][] = ['light', 'dark']; export default { component: SentimentSurface, title: 'Foundations/SentimentSurface/Tests', tags: ['!autodocs', '!manifest'], } satisfies Meta; type Story = StoryObj; export const NestedSentiments: Story = { tags: ['!dev'], render: () => (
Outer: Negative, base
Inner: Success, elevated
Deepest: Warning, base
Outer: Proposition, elevated
Inner: Neutral, base
), }; export const NestedThemes: Story = { render: () => (
Page is in Personal Forest Green Theme Some Component with Success Sentiment Island of Personal Light Theme Some Component with Success Sentiment
), }; const ButtonsGrid = () => (
{emphasisLevels.map((emphasis) => sentiments.map((sentiment) => ( {sentiment} ({emphasis}) )), )}
); export const ButtonsAcrossThemes: Story = { render: () => (
{/* Themes with light/dark screen modes */} {themesWithScreenModes.map((theme) => screenModes.map((screenMode) => (

{theme} - {screenMode}

)), )} {/* Themes without light/dark variants */} {themesWithoutScreenModes.map((theme) => (

{theme}

))}
), }; export const NeutralSentimentOnNeutralBackground: Story = { render: () => (
), };