dynamic-forms-ionic / TypeAlias

IonicFormConfig

Generic types:TFields TValue

Ionic-specific FormConfig with type-safe defaultProps.

Use this type alias when defining form configurations with Ionic components to get IDE autocomplete and type checking for defaultProps.

Presentation

type IonicFormConfig = FormConfig<TFields, TValue, IonicFormProps>;

Example usage

const formConfig: IonicFormConfig = {
  defaultProps: {
    fill: 'outline',
    labelPlacement: 'floating',
    color: 'primary',
  },
  fields: [
    { type: 'ionic-input', key: 'name', label: 'Name' },  // Uses form defaultProps
    { type: 'ionic-input', key: 'email', props: { fill: 'solid' } },  // Override
  ],
};