@@ -4,7 +4,6 @@ import { userEvent, waitFor, within } from '@storybook/test';
44import { expect } from '@storybook/test' ;
55
66import {
7- Alert ,
87 Block ,
98 Checkbox ,
109 CheckboxGroup ,
@@ -17,18 +16,17 @@ import {
1716 RangeSlider ,
1817 Slider ,
1918 Select ,
20- SubmitButton ,
21- SubmitError ,
2219 Switch ,
2320 DateInput ,
2421 TextInput ,
2522 NumberInput ,
2623 parseAbsoluteDate ,
2724 FileInput ,
25+ Space ,
26+ Button ,
2827} from '../../../index' ;
2928// import { NumberInput } from '../NumberInput/NumberInput';
3029import { baseProps } from '../../../stories/lists/baseProps' ;
31- import { Button } from '../../actions/index' ;
3230import { timeout } from '../../../utils/promise' ;
3331
3432export default {
@@ -69,8 +67,8 @@ export default {
6967// >
7068// <TextInput />
7169// </Field>
72- // <Submit>Submit</Submit>
73- // <SubmitError />
70+ // <Form. Submit>Submit</Form. Submit>
71+ // <Form. SubmitError />
7472// </Form>
7573// );
7674// };
@@ -94,8 +92,8 @@ const CustomSubmitErrorTemplate: StoryFn<typeof Form> = (args) => {
9492 < Field name = "text" label = "Text input" >
9593 < TextInput />
9694 </ Field >
97- < SubmitButton > Submit</ SubmitButton >
98- { form . submitError ? < Alert > { form . submitError as string } </ Alert > : null }
95+ < Form . Submit > Submit</ Form . Submit >
96+ < Form . SubmitError />
9997 </ Form >
10098 ) ;
10199} ;
@@ -119,8 +117,8 @@ const SubmitErrorTemplate: StoryFn<typeof Form> = (args) => {
119117 < Field name = "text" label = "Text input" >
120118 < TextInput />
121119 </ Field >
122- < SubmitButton > Submit</ SubmitButton >
123- < SubmitError />
120+ < Form . Submit > Submit</ Form . Submit >
121+ < Form . SubmitError />
124122 </ Form >
125123 ) ;
126124} ;
@@ -161,7 +159,10 @@ const AsyncValidationTemplate: StoryFn<typeof Form> = (args) => {
161159 >
162160 < TextInput />
163161 </ Field >
164- < SubmitButton > Submit</ SubmitButton >
162+ < Space >
163+ < Form . Submit > Submit</ Form . Submit >
164+ < Form . Reset > Reset</ Form . Reset >
165+ </ Space >
165166 </ Form >
166167 ) ;
167168} ;
@@ -269,7 +270,6 @@ const Template: StoryFn<typeof Form> = (args) => {
269270 } ,
270271 ] }
271272 necessityIndicator = { 'label' }
272- 273273 shouldUpdate = { ( { email } ) => {
274274 return ! ! email ;
275275 } }
@@ -353,7 +353,10 @@ const Template: StoryFn<typeof Form> = (args) => {
353353 >
354354 < RangeSlider minValue = { 0 } maxValue = { 100 } />
355355 </ Field >
356- < SubmitButton > Submit</ SubmitButton >
356+ < Space >
357+ < Form . Submit > Submit</ Form . Submit >
358+ < Form . Reset > Reset</ Form . Reset >
359+ </ Space >
357360 </ Form >
358361 </ >
359362 ) ;
0 commit comments