Files
quinn-wx/components/switch/type.d.ts
2022-11-25 16:54:11 +08:00

38 lines
926 B
TypeScript

export interface TdSwitchProps {
colors?: {
type: ArrayConstructor;
value?: string[];
};
customValue?: {
type: ArrayConstructor;
value?: Array<SwitchValue>;
};
disabled?: {
type: BooleanConstructor;
value?: boolean;
};
label?: {
type: StringConstructor;
value?: string;
};
loading?: {
type: BooleanConstructor;
value?: boolean;
};
size?: {
type: StringConstructor;
value?: 'small' | 'medium' | 'large';
};
value?: {
type: BooleanConstructor;
optionalTypes: Array<NumberConstructor | StringConstructor>;
value?: SwitchValue;
};
defaultValue?: {
type: BooleanConstructor;
optionalTypes: Array<NumberConstructor | StringConstructor>;
value?: SwitchValue;
};
}
export declare type SwitchValue = string | number | boolean;