<Button/>
The button with a custom onClick
listener that allows for easy navigation between pages and dynamic rendering of fields in a FieldArray
.
onClick?: (e: MouseEvent<HTMLButtonElement>) => (void | typeof NextPage | typeof PrevPage | string)
- the function called on the current form data and the mouse event. If ever it returnsNextPage
, the form transitions to the next page. If it returnsPrevPage
, the form transitions to the previous page. If it returns astring
, it will look push to aFieldArray
value using the first item in it as template.as?: React.FC
- the function component to be rendered in place of the nativebutton
element.- the React-extended props of the native HTML
button
element and any other props ifas
is provided.