libs/core/dynamic-form/switcher/src/switcher.model.ts
Configuration for a dynamic input field.
Properties |
|
labelPosition (Optional) | |
Type |
SwitcherLabelPosition
|
Description
|
Sets the label position to be on the left or right. Default is left. |
size (Optional) | |
Type |
SwitcherSize
|
Description
|
Sets the switcher size to be small or large. Default is small. |
type | |
Description
|
Specifies the type of the field as |
import { DfInteractiveBaseConfig } from '@allianz/taly-core/dynamic-form';
/**
* The value to use for the `type` attribute of switcher formfield configs.
*/
export const DfSwitcherTypeName = 'SWITCHER';
/**
* Configuration for a dynamic input field.
*
* @additionalProperties false
*/
export interface DfSwitcherConfig extends DfInteractiveBaseConfig {
/**
* Specifies the type of the field as `SWITCHER`.
*/
type: typeof DfSwitcherTypeName;
/**
* Sets the label position to be on the left or right. Default is left.
*/
labelPosition?: SwitcherLabelPosition;
/**
* Sets the switcher size to be small or large. Default is small.
*/
size?: SwitcherSize;
}
export const SwitcherLabelPosition = {
Left: 'left',
Right: 'right'
} as const;
type SwitcherLabelPosition = (typeof SwitcherLabelPosition)[keyof typeof SwitcherLabelPosition];
export const SwitcherSize = {
Small: 'small',
Large: 'large'
} as const;
type SwitcherSize = (typeof SwitcherSize)[keyof typeof SwitcherSize];