This PR updates the Form component to fix the following error that we are receiving when trying to use it:
Type '{ children: Element[]; id: string; label: string; submitHandler: () => void; }' is not assignable to type 'IntrinsicAttributes & FormProps'.
Property 'children' does not exist on type 'IntrinsicAttributes & FormProps'.
We have seen this error in the past when trying to update Mark One to React 18. This was solved by explicitly passing down children as a prop.
The PR also updates the Button component to include an optional type property. If not specified, the type defaults to button. This way, we will be able to specify a type of submit so that we can more properly handle and associate forms with submit buttons.
Describe your changes
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality
to change)
Checklist:
[x] I have run eslint on the code
[x] I have added JSDoc for all of my code (where applicable)
This PR updates the
Form
component to fix the following error that we are receiving when trying to use it:We have seen this error in the past when trying to update Mark One to React 18. This was solved by explicitly passing down
children
as a prop.The PR also updates the
Button
component to include an optionaltype
property. If not specified, thetype
defaults tobutton
. This way, we will be able to specify atype
ofsubmit
so that we can more properly handle and associate forms with submit buttons.Describe your changes
Types of changes
Checklist:
eslint
on the codePriority:
Related Issues:
Fixes #40