maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
70 lines (69 loc) • 2.41 kB
TypeScript
import { HTMLAttributes } from 'vue';
import { MazColor } from './types';
export interface MazSwitchProps {
/** Style attribut of the component root element */
style?: HTMLAttributes['style'];
/** Class attribut of the component root element */
class?: HTMLAttributes['class'];
/** The model value of the switch */
modelValue?: boolean;
/** The id of the switch */
id?: string;
/** If the switch is disabled */
disabled?: boolean;
/** The name of the switch */
name?: string;
/** Text label */
label?: string;
/** The color of the switch */
color?: MazColor;
/** Whether there is an error with the input. */
error?: boolean;
/** Whether the input is successful. */
success?: boolean;
/** Whether there is a warning with the input. */
warning?: boolean;
/** The hint text to display below the input. */
hint?: string;
}
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
default?(_: {
value: boolean;
}): any;
};
refs: {
inputRef: HTMLInputElement;
};
rootEl: any;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<MazSwitchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
blur: (value: FocusEvent) => any;
change: (value: boolean) => any;
focus: (value: FocusEvent) => any;
"update:model-value": (value: boolean) => any;
}, string, import('vue').PublicProps, Readonly<MazSwitchProps> & Readonly<{
onBlur?: ((value: FocusEvent) => any) | undefined;
onChange?: ((value: boolean) => any) | undefined;
onFocus?: ((value: FocusEvent) => any) | undefined;
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
}>, {
name: string;
style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
class: HTMLAttributes["class"];
color: MazColor;
disabled: boolean;
id: string;
modelValue: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
inputRef: HTMLInputElement;
}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};