storybook/docs/snippets/svelte/component-story-static-asset-cdn.js.mdx
2021-11-06 03:20:29 +00:00

22 lines
485 B
Plaintext

```js
// MyComponent.stories.js
import MyComponent from './MyComponent.svelte';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/svelte/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'img',
component: MyComponent,
};
export const WithAnImage = () => ({
Component: MyComponent,
props: {
src: 'https://place-hold.it/350x150',
alt: 'My CDN placeholder',
},
});
```