-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yourgov: Make steps mutable by decoupling components from array order
- Loading branch information
1 parent
6c7351c
commit e4591a3
Showing
48 changed files
with
1,400 additions
and
1,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ag.ds-next/yourgov': minor | ||
--- | ||
|
||
yourgov: Edit application from Review and Submit step as a substep, rather than being dropped back into the form-step flow. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
yourgov/components/FormMobileFoodVendorPermit/steps/Form.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { FormEventHandler, ReactNode } from 'react'; | ||
import { Stack } from '@ag.ds-next/react/stack'; | ||
import { StepActions } from '../StepActions'; | ||
|
||
type FormProps = { | ||
children?: ReactNode; | ||
noValidate?: boolean; | ||
onSubmit: FormEventHandler<HTMLFormElement>; | ||
submitText?: string; | ||
}; | ||
|
||
export const Form = ({ | ||
children, | ||
noValidate = true, | ||
onSubmit, | ||
submitText, | ||
}: FormProps) => { | ||
return ( | ||
<Stack as="form" gap={3} noValidate={noValidate} onSubmit={onSubmit}> | ||
{children} | ||
|
||
<StepActions submitText={submitText} /> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.