@joker.front/ui
Version:
Joker-UI | Official native UI component library for Joker Framework. Minimalist design with full-scene components, responsive layout & dynamic interactions. Access dev docs, API references & real-world case studies on official site.
40 lines (39 loc) • 1.48 kB
TypeScript
import { Component } from "@joker.front/core";
type MessageCom = Component & {
inputValue: string;
};
export type PropsOption = Partial<{
$type: string;
message: string;
title: string;
customClass: string;
iconClass: string;
id: string;
center: boolean;
type: "warning" | "error" | "success" | "info";
closable: boolean;
distinguishCancelAndClose: boolean;
useHtml: boolean;
showInput: boolean;
inputPlaceholder: string;
inputValue: string;
validate: (val: string) => string | boolean | void | undefined;
cancelButtonText: string;
confirmButtonText: string;
showConfirmButton: boolean;
showCancelButton: boolean;
roundButton: boolean;
closeOnClickModal: boolean;
closeOnPressEscape: boolean;
beforeClose: (action: Action, instance: MessageCom, doClose: Function) => void;
callback: (action: Action, instance: MessageCom) => void;
}>;
export type Action = "close" | "cancel" | "confirm";
declare function MessageBox(option: string | PropsOption, callback?: PropsOption["callback"]): void;
declare namespace MessageBox {
var alert: (message: string, titleOrOption?: string | PropsOption, option?: PropsOption) => void;
var confirm: (message: string, titleOrOption?: string | PropsOption, option?: PropsOption) => void;
var prompt: (message: string, titleOrOption?: string | PropsOption, option?: PropsOption) => void;
var closeAll: () => void;
}
export { MessageBox };