File tree Expand file tree Collapse file tree 2 files changed +26
-29
lines changed Expand file tree Collapse file tree 2 files changed +26
-29
lines changed Original file line number Diff line number Diff line change 1
- import { Story } from "@storybook/react" ;
2
- import {
3
- TemplateVersionWarnings ,
4
- TemplateVersionWarningsProps ,
5
- } from "./TemplateVersionWarnings" ;
1
+ import { TemplateVersionWarnings } from "./TemplateVersionWarnings" ;
2
+ import type { Meta , StoryObj } from "@storybook/react" ;
6
3
7
- export default {
4
+ const meta : Meta < typeof TemplateVersionWarnings > = {
8
5
title : "components/TemplateVersionWarnings" ,
9
6
component : TemplateVersionWarnings ,
10
7
} ;
11
8
12
- const Template : Story < TemplateVersionWarningsProps > = ( args ) => (
13
- < TemplateVersionWarnings { ...args } />
14
- ) ;
9
+ export default meta ;
10
+ type Story = StoryObj < typeof TemplateVersionWarnings > ;
15
11
16
- export const UnsupportedWorkspaces = Template . bind ( { } ) ;
17
- UnsupportedWorkspaces . args = {
18
- warnings : [ "UNSUPPORTED_WORKSPACES" ] ,
12
+ export const UnsupportedWorkspaces : Story = {
13
+ args : {
14
+ warnings : [ "UNSUPPORTED_WORKSPACES" ] ,
15
+ } ,
19
16
} ;
Original file line number Diff line number Diff line change 1
- import { Story } from "@storybook/react " ;
2
- import { Typography , TypographyProps } from "./Typography " ;
1
+ import { Typography } from "./Typography " ;
2
+ import type { Meta , StoryObj } from "@storybook/react " ;
3
3
4
- export default {
4
+ const meta : Meta < typeof Typography > = {
5
5
title : "components/Typography" ,
6
6
component : Typography ,
7
+ args : {
8
+ children : "Colorless green ideas sleep furiously" ,
9
+ } ,
7
10
} ;
8
11
9
- const Template : Story < TypographyProps > = ( args : TypographyProps ) => (
10
- < >
11
- < Typography { ...args } > Colorless green ideas sleep furiously</ Typography >
12
- < Typography { ...args } >
13
- More people have been to France than I have
14
- </ Typography >
15
- </ >
16
- ) ;
12
+ export default meta ;
13
+ type Story = StoryObj < typeof Typography > ;
17
14
18
- export const Short = Template . bind ( { } ) ;
19
- Short . args = {
20
- short : true ,
15
+ export const Short : Story = {
16
+ args : {
17
+ short : true ,
18
+ } ,
21
19
} ;
22
- export const Tall = Template . bind ( { } ) ;
23
- Tall . args = {
24
- short : false ,
20
+
21
+ export const Tall : Story = {
22
+ args : {
23
+ short : false ,
24
+ } ,
25
25
} ;
You can’t perform that action at this time.
0 commit comments