ES Modulesに移行
This commit is contained in:
parent
0c3df4245d
commit
69212dd99a
105 changed files with 3154 additions and 3230 deletions
|
@ -1,11 +1,11 @@
|
|||
export interface ModalTypeDialog {
|
||||
type: 'dialog';
|
||||
title?: string;
|
||||
message: string;
|
||||
icon?: DialogIcon;
|
||||
buttons?: DialogButtonType;
|
||||
primaryClassName?: string;
|
||||
onSelect?: (clickedButtonIndex: number) => void;
|
||||
type: 'dialog';
|
||||
title?: string;
|
||||
message: string;
|
||||
icon?: DialogIcon;
|
||||
buttons?: DialogButtonType;
|
||||
primaryClassName?: string;
|
||||
onSelect?: (clickedButtonIndex: number) => void;
|
||||
}
|
||||
|
||||
export type DialogIcon = 'info' | 'warning' | 'error' | 'question';
|
||||
|
@ -15,20 +15,20 @@ export type DialogButtonType = 'ok' | 'yesNo' | DialogButton[];
|
|||
export type DialogButtonStyle = 'primary' | 'danger';
|
||||
|
||||
export interface DialogButton {
|
||||
text: string;
|
||||
style?: DialogButtonStyle;
|
||||
text: string;
|
||||
style?: DialogButtonStyle;
|
||||
}
|
||||
|
||||
export const builtinDialogButtonOk: DialogButton = {
|
||||
text: 'OK',
|
||||
style: 'primary',
|
||||
text: 'OK',
|
||||
style: 'primary',
|
||||
};
|
||||
|
||||
export const builtinDialogButtonYes: DialogButton = {
|
||||
text: 'はい',
|
||||
style: 'primary',
|
||||
text: 'はい',
|
||||
style: 'primary',
|
||||
};
|
||||
|
||||
export const builtinDialogButtonNo: DialogButton = {
|
||||
text: 'いいえ',
|
||||
text: 'いいえ',
|
||||
};
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
export interface ModalTypeMenu {
|
||||
type: 'menu';
|
||||
screenX: number;
|
||||
screenY: number;
|
||||
items: MenuItem[];
|
||||
type: 'menu';
|
||||
screenX: number;
|
||||
screenY: number;
|
||||
items: MenuItem[];
|
||||
}
|
||||
|
||||
export type MenuItemClassName = `fas fa-${string}`;
|
||||
|
||||
export interface MenuItem {
|
||||
icon?: MenuItemClassName;
|
||||
name: string;
|
||||
onClick: VoidFunction;
|
||||
disabled?: boolean;
|
||||
danger?: boolean;
|
||||
icon?: MenuItemClassName;
|
||||
name: string;
|
||||
onClick: VoidFunction;
|
||||
disabled?: boolean;
|
||||
danger?: boolean;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@ import { ModalTypeDialog } from './dialog';
|
|||
import { ModalTypeMenu } from './menu';
|
||||
|
||||
export type Modal =
|
||||
| ModalTypeMenu
|
||||
| ModalTypeDialog;
|
||||
| ModalTypeMenu
|
||||
| ModalTypeDialog;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue