Form properties
Summary
Props table
Parameter |
Type |
Default |
---|---|---|
string |
/ |
|
Record |
{} |
|
string | JSX.Element |
/ |
|
string |
/ |
|
JSX.Element |
/ |
|
(fieldValues: Record |
/ |
|
(fieldValues: Record |
/ |
Props list
title
Type |
Default |
---|---|
string |
/ |
Form title
fields
Type |
Default |
---|---|
Record |
{} |
Form fields object. Every key is the field unique ID, and will be used on submit when returning their values
submitContent
Type |
Default |
---|---|
string | JSX.Element |
/ |
Custom submit button content
fieldClassName
Type |
Default |
---|---|
string |
/ |
Custom classname applied on every field
children
Type |
Default |
---|---|
JSX.Element |
/ |
Form content
validate
Type |
Default |
---|---|
(fieldValues: Record |
/ |
Custom validation callback. Must return an object with every field associated with a boolean value (if false
, the field will be in error state)
onSubmit
Type |
Default |
---|---|
(fieldValues: Record |
/ |
Custom callback, called on submit