File tree Expand file tree Collapse file tree 1 file changed +15
-19
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Original file line number Diff line number Diff line change 1- import { space } from '@guardian/source/foundations' ;
2- import type { StoryFn } from '@storybook/react' ;
1+ import type { Meta , StoryObj } from '@storybook/react' ;
32import { ProductLinkButton } from './ProductLinkButton' ;
43
5- export default {
4+ const meta = {
65 component : ProductLinkButton ,
76 title : 'Components/ProductLinkButton' ,
8- decorators : [
9- ( Story : StoryFn ) => (
10- < div style = { { padding : ` ${ space [ 3 ] } px` } } >
11- < Story />
12- </ div >
13- ) ,
14- ] ,
15- } ;
7+ parameters : {
8+ layout : 'padded' ,
9+ } ,
10+ args : {
11+ label : '£6.50 for 350g at Ollie’s Kimchi' ,
12+ url : 'https://ollieskimchi.co.uk/shop/ols/products/ollies-kimchi' ,
13+ } ,
14+ } satisfies Meta < typeof ProductLinkButton > ;
1615
17- export const ProductLinkButtonStory = ( ) => {
18- return (
19- < ProductLinkButton
20- label = "£6.50 for 350g at Ollie’s Kimchi"
21- url = "https://ollieskimchi.co.uk/shop/ols/products/ollies-kimchi"
22- />
23- ) ;
24- } ;
16+ export default meta ;
17+
18+ type Story = StoryObj < typeof meta > ;
19+
20+ export const Default = { } satisfies Story ;
You can’t perform that action at this time.
0 commit comments