Files
Desktop/ts/components/ImageOrBlurhash.dom.stories.tsx
Jamie b405e3d83d Prepare for upgrade to React 19
Co-authored-by: ayumi-signal <ayumi@signal.org>
2025-12-23 13:42:56 -08:00

68 lines
1.3 KiB
TypeScript

// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
import type { Meta } from '@storybook/react';
import type { Props } from './ImageOrBlurhash.dom.js';
import { ImageOrBlurhash } from './ImageOrBlurhash.dom.js';
export default {
title: 'Components/ImageOrBlurhash',
} satisfies Meta<Props>;
export function JustImage(): React.JSX.Element {
return (
<ImageOrBlurhash
src="/fixtures/kitten-1-64-64.jpg"
width={128}
height={128}
alt="test"
/>
);
}
export function JustBlurHash(): React.JSX.Element {
return (
<ImageOrBlurhash
blurHash="LDA,FDBnm+I=p{tkIUI;~UkpELV]"
width={128}
height={128}
alt="test"
/>
);
}
export function WideBlurHash(): React.JSX.Element {
return (
<ImageOrBlurhash
blurHash="LDA,FDBnm+I=p{tkIUI;~UkpELV]"
width={300}
height={65}
alt="test"
/>
);
}
export function TallBlurHash(): React.JSX.Element {
return (
<ImageOrBlurhash
blurHash="LDA,FDBnm+I=p{tkIUI;~UkpELV]"
width={64}
height={256}
alt="test"
/>
);
}
export function FullImage(): React.JSX.Element {
return (
<ImageOrBlurhash
src="/fixtures/kitten-1-64-64.jpg"
blurHash="LDA,FDBnm+I=p{tkIUI;~UkpELV]"
width={128}
height={128}
alt="test"
/>
);
}