BsFormConfig
| Generic types: | TFields TValue |
Bootstrap-specific FormConfig with type-safe defaultProps.
Use this type alias when defining form configurations with Bootstrap components to get IDE autocomplete and type checking for defaultProps.
Presentation
type BsFormConfig = FormConfig <TFields, TValue, BsFormProps >;Example usage
const formConfig : BsFormConfig = {
defaultProps: {
size: 'sm',
floatingLabel: true,
variant: 'primary',
},
fields: [
{ type: 'bs-input', key: 'name', label: 'Name' }, // Uses form defaultProps
{ type: 'bs-input', key: 'email', props: { size: 'lg' } }, // Override
],
};