- update client and server dependencies within their ranges, keeping all playwright packages aligned at 1.63 - fix code flagged by react-hooks 7.1: refs written during render and synchronous setState in effects - add stories for the ui components that had none, with interaction tests, and cover all DescriptionList layouts - drop the unused mdx stories pattern - run the storybook tests as part of the pre-commit checks - bump version to 1.20.1
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
import { Notification } from '../../src/ui/Notification/Notification';
|
|
|
|
const meta: Meta<typeof Notification> = {
|
|
title: 'UI/Notification',
|
|
component: Notification,
|
|
parameters: { layout: 'padded' },
|
|
tags: ['autodocs'],
|
|
argTypes: {
|
|
variant: { control: 'select', options: ['info', 'success', 'error', 'warning', 'note'] },
|
|
},
|
|
};
|
|
export default meta;
|
|
type Story = StoryObj<typeof Notification>;
|
|
|
|
export const Info: Story = {
|
|
args: {
|
|
variant: 'info',
|
|
title: 'Traces are off',
|
|
children: 'Enable them per run in the run modal.',
|
|
},
|
|
};
|
|
export const Success: Story = { args: { variant: 'success', children: 'Scenario imported.' } };
|
|
export const Error: Story = {
|
|
args: { variant: 'error', title: 'Run failed', children: 'Step 2 timed out after 60s.' },
|
|
};
|
|
export const Warning: Story = {
|
|
args: { variant: 'warning', children: 'The environment of this run no longer exists.' },
|
|
};
|
|
export const Note: Story = { args: { variant: 'note', children: 'Pinned snippet version: v3.' } };
|