File tree 1 file changed +22
-19
lines changed 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change 1
- import { ComponentMeta , Story } from "@storybook/react" ;
2
1
import { PageHeader , PageHeaderSubtitle , PageHeaderTitle } from "./PageHeader" ;
2
+ import type { Meta , StoryObj } from "@storybook/react" ;
3
3
4
- export default {
4
+ const meta : Meta < typeof PageHeader > = {
5
5
title : "components/PageHeader" ,
6
6
component : PageHeader ,
7
- } as ComponentMeta < typeof PageHeader > ;
7
+ } ;
8
8
9
- const WithTitleTemplate : Story = ( ) => (
10
- < PageHeader >
11
- < PageHeaderTitle > Templates</ PageHeaderTitle >
12
- </ PageHeader >
13
- ) ;
9
+ export default meta ;
10
+ type Story = StoryObj < typeof PageHeader > ;
14
11
15
- export const WithTitle = WithTitleTemplate . bind ( { } ) ;
12
+ export const WithTitle : Story = {
13
+ args : {
14
+ children : < PageHeaderTitle > Templates</ PageHeaderTitle > ,
15
+ } ,
16
+ } ;
16
17
17
- const WithSubtitleTemplate : Story = ( ) => (
18
- < PageHeader >
19
- < PageHeaderTitle > Templates</ PageHeaderTitle >
20
- < PageHeaderSubtitle >
21
- Create a new workspace from a Template
22
- </ PageHeaderSubtitle >
23
- </ PageHeader >
24
- ) ;
25
-
26
- export const WithSubtitle = WithSubtitleTemplate . bind ( { } ) ;
18
+ export const WithSubtitle : Story = {
19
+ args : {
20
+ children : (
21
+ < >
22
+ < PageHeaderTitle > Templates</ PageHeaderTitle >
23
+ < PageHeaderSubtitle >
24
+ Create a new workspace from a Template
25
+ </ PageHeaderSubtitle >
26
+ </ >
27
+ ) ,
28
+ } ,
29
+ } ;
You can’t perform that action at this time.
0 commit comments