11import React from 'react' ;
2- import { storybookArgTypes , StoryMetaType } from '@lg-tools/storybook-utils' ;
2+ import { StoryMetaType } from '@lg-tools/storybook-utils' ;
33import { StoryObj } from '@storybook/react' ;
44
5- import { Body } from '@leafygreen-ui/typography' ;
5+ import { Body , Description , H3 } from '@leafygreen-ui/typography' ;
66
77import { WizardProvider } from '../WizardContext' ;
88
9- import { WizardStep } from '.' ;
9+ import { WizardStep , WizardStepProps } from '.' ;
1010
1111const meta : StoryMetaType < typeof WizardStep > = {
1212 title : 'Composition/Wizard/WizardStep' ,
@@ -21,16 +21,16 @@ const meta: StoryMetaType<typeof WizardStep> = {
2121 </ WizardProvider >
2222 ) ,
2323 ] ,
24- argTypes : {
25- title : storybookArgTypes . children ,
26- description : storybookArgTypes . children ,
27- children : storybookArgTypes . children ,
28- } ,
2924} ;
3025
3126export default meta ;
3227
33- export const LiveExample : StoryObj < typeof WizardStep > = {
28+ interface WizardStepStoryProps extends WizardStepProps {
29+ title : string ;
30+ description : string ;
31+ }
32+
33+ export const LiveExample : StoryObj < WizardStepStoryProps > = {
3434 args : {
3535 title : 'Step 1: Basic Information' ,
3636 description : 'Please provide your basic information to get started.' ,
@@ -43,32 +43,16 @@ export const LiveExample: StoryObj<typeof WizardStep> = {
4343 </ div >
4444 ) ,
4545 } ,
46- render : args => < WizardStep { ...args } /> ,
47- } ;
48-
49- export const WithLongDescription : StoryObj < typeof WizardStep > = {
50- args : {
51- title : 'Step 2: Detailed Configuration' ,
52- description : (
53- < div >
54- < Body >
55- This step involves more complex configuration options. Please read
56- carefully before proceeding.
57- </ Body >
58- < Body >
59- < ul >
60- < li > Configure your primary settings</ li >
61- < li > Set up your preferences</ li >
62- < li > Review the terms and conditions</ li >
63- </ ul >
64- </ Body >
65- </ div >
66- ) ,
67- children : (
68- < div >
69- < Body > Complex form content would go here...</ Body >
70- < button type = "button" > Sample Button</ button >
71- </ div >
72- ) ,
46+ argTypes : {
47+ title : { control : 'text' } ,
48+ description : { control : 'text' } ,
49+ children : { control : 'text' } ,
7350 } ,
51+ render : args => (
52+ < WizardStep >
53+ < H3 > { args . title } </ H3 >
54+ < Description > { args . description } </ Description >
55+ < Body > { args . children } </ Body >
56+ </ WizardStep >
57+ ) ,
7458} ;
0 commit comments