Represents the properties for a switch field component.

interface ISwitchFieldProps<Data = IAnything, Payload = IAnything> {
    disabled?: boolean;
    groupRef?: (element?: null | HTMLDivElement) => void;
    readonly?: boolean;
    switchActiveLabel?: string;
    switchNoColor?: boolean;
    title?: string;
}

Type Parameters

  • Data = IAnything

    The type of data for the field.

  • Payload = IAnything

    The type of payload for the field.

Hierarchy (View Summary)

Properties

disabled?: boolean

Represents the 'disabled' property of a field in a form.

The data type associated with the form.

The payload type associated with the form.

groupRef?: (element?: null | HTMLDivElement) => void

Retrieves the 'groupRef' property from an object based on the given type.

Type declaration

    • (element?: null | HTMLDivElement): void
    • Parameters

      • Optionalelement: null | HTMLDivElement

      Returns void

      • The 'groupRef' property from the given object.
readonly?: boolean

Represents the readonly property of an IField object.

switchActiveLabel?: string

Gets the value of the switchActiveLabel property from the given field.

The field object from which to get the switchActiveLabel property.

  • The value of the switchActiveLabel property.
switchNoColor?: boolean

The switchNoColor property of the Field interface.

title?: string

Retrieves the value of the 'title' property from an object of type IField<Data, Payload>.

The type of the data contained in the field.

The type of the payload associated with the field.

An object of type IField<Data, Payload>.

  • The value of the 'title' property from the given field.