UNPKG

@agendize/design-system

Version:
34 lines 1.09 kB
import { Ref } from "vue"; import { ButtonColor } from "../action/button/viewModel"; export declare enum BtnState { INITIAL = 0, WAITING = 1, READY = 2, RUNNING = 3, ACTION_OK = 4, ACTION_KO = 5 } export interface ButtonValidationProps { id: string; action: Function; getStateLabel: (state?: BtnState) => string; getAriaLabel: (state?: BtnState) => string; getLeftIcon?: string | ((state?: BtnState) => string); tooltips?: (state?: BtnState) => string; color?: ButtonColor; stretch?: boolean; waitingTimer?: number; waitingResetTimer?: number; errorResetTimer?: number; displayErrorMessage?: boolean; disabled?: boolean; } export declare function BtnValidationViewModel(emitter: Function, props: ButtonValidationProps): { state: Ref<BtnState, BtnState>; btnLabel: Ref<string, string>; ariaLabel: Ref<string, string>; btnLeftIcon: Ref<string | undefined, string | undefined>; errorMessage: Ref<string, string>; onClick: (payload: MouseEvent) => void; }; //# sourceMappingURL=viewModel.d.ts.map