Upgrade Storybook
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
8c966dfbd8
commit
502ea174ab
328 changed files with 10863 additions and 12432 deletions
|
@ -2,18 +2,18 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { setupI18n } from '../util/setupI18n';
|
||||
import enMessages from '../../_locales/en/messages.json';
|
||||
import type { PropsType } from './Alert';
|
||||
import { Alert } from './Alert';
|
||||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
export default {
|
||||
title: 'Components/Alert',
|
||||
};
|
||||
} satisfies Meta<PropsType>;
|
||||
|
||||
const defaultProps = {
|
||||
i18n,
|
||||
|
@ -33,10 +33,6 @@ export function TitleAndBodyAreStrings(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
TitleAndBodyAreStrings.story = {
|
||||
name: 'Title and body are strings',
|
||||
};
|
||||
|
||||
export function BodyIsAReactNode(): JSX.Element {
|
||||
return (
|
||||
<Alert
|
||||
|
@ -52,10 +48,6 @@ export function BodyIsAReactNode(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
BodyIsAReactNode.story = {
|
||||
name: 'Body is a ReactNode',
|
||||
};
|
||||
|
||||
export function LongBodyWithoutTitle(): JSX.Element {
|
||||
return (
|
||||
<Alert
|
||||
|
@ -72,10 +64,6 @@ export function LongBodyWithoutTitle(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
LongBodyWithoutTitle.story = {
|
||||
name: 'Long body (without title)',
|
||||
};
|
||||
|
||||
export function LongBodyWithTitle(): JSX.Element {
|
||||
return (
|
||||
<Alert
|
||||
|
@ -92,7 +80,3 @@ export function LongBodyWithTitle(): JSX.Element {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
LongBodyWithTitle.story = {
|
||||
name: 'Long body (with title)',
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue