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,9 +2,8 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { pngUrl } from '../../storybook/Fixtures';
|
||||
import type { Props } from './Image';
|
||||
import { CurveType, Image } from './Image';
|
||||
|
@ -20,7 +19,7 @@ const i18n = setupI18n('en', enMessages);
|
|||
|
||||
export default {
|
||||
title: 'Components/Conversation/Image',
|
||||
};
|
||||
} satisfies Meta<Props>;
|
||||
|
||||
const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
||||
alt: overrideProps.alt || '',
|
||||
|
@ -60,10 +59,6 @@ export function UrlWithHeightWidth(): JSX.Element {
|
|||
return <Image {...props} />;
|
||||
}
|
||||
|
||||
UrlWithHeightWidth.story = {
|
||||
name: 'URL with Height/Width',
|
||||
};
|
||||
|
||||
export function Caption(): JSX.Element {
|
||||
const defaultProps = createProps();
|
||||
const props = {
|
||||
|
@ -112,10 +107,6 @@ export function NoBorderOrBackground(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
NoBorderOrBackground.story = {
|
||||
name: 'No Border or Background',
|
||||
};
|
||||
|
||||
export function Pending(): JSX.Element {
|
||||
const props = createProps({
|
||||
attachment: fakeAttachment({
|
||||
|
@ -149,10 +140,6 @@ export function PendingWBlurhash(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
PendingWBlurhash.story = {
|
||||
name: 'Pending w/blurhash',
|
||||
};
|
||||
|
||||
export function CurvedCorners(): JSX.Element {
|
||||
const props = createProps({
|
||||
curveBottomLeft: CurveType.Normal,
|
||||
|
@ -200,10 +187,6 @@ export function FullOverlayWithText(): JSX.Element {
|
|||
return <Image {...props} />;
|
||||
}
|
||||
|
||||
FullOverlayWithText.story = {
|
||||
name: 'Full Overlay with Text',
|
||||
};
|
||||
|
||||
export function Blurhash(): JSX.Element {
|
||||
const defaultProps = createProps();
|
||||
const props = {
|
||||
|
@ -229,10 +212,6 @@ export function UndefinedBlurHash(): JSX.Element {
|
|||
return <UndefinedBlurHashWrapper />;
|
||||
}
|
||||
|
||||
UndefinedBlurHash.story = {
|
||||
name: 'undefined blurHash',
|
||||
};
|
||||
|
||||
export function MissingImage(): JSX.Element {
|
||||
const defaultProps = createProps();
|
||||
const props = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue