storybook/docs/snippets/react/component-story-static-asset-cdn.ts-4-9.mdx
Kasper Peulen 7452663a26 Prettyyy
2023-01-17 08:10:49 +01:00

25 lines
619 B
Plaintext

```tsx
// MyComponent.stories.ts|tsx
import type { Meta, StoryObj } from '@storybook/react';
import { MyComponent } from './MyComponent';
const meta = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'img',
} satisfies Meta<typeof MyComponent>;
export default meta;
type Story = StoryObj<typeof meta>;
export const WithAnImage: Story = {
render: () => (
<img src="https://storybook.js.org/images/placeholders/350x150.png" alt="My CDN placeholder" />
),
};
```