mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
23 lines
726 B
TypeScript
23 lines
726 B
TypeScript
|
|
import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types';
|
||
|
|
|
||
|
|
interface InputDialogRowProps {
|
||
|
|
type: 'input' | 'number' | 'checkbox' | 'select' | 'slider';
|
||
|
|
label: string;
|
||
|
|
options?: { value: string; label: string; default?: string }[];
|
||
|
|
password?: boolean;
|
||
|
|
icon?: IconName | [IconPrefix, IconName];
|
||
|
|
iconColor?: string;
|
||
|
|
placeholder?: string;
|
||
|
|
default?: string | number;
|
||
|
|
checked?: boolean;
|
||
|
|
min?: number;
|
||
|
|
max?: number;
|
||
|
|
step?: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
type inputDialog = (
|
||
|
|
heading: string,
|
||
|
|
rows: string[] | InputDialogRowProps[]
|
||
|
|
) => Promise<Array<string | number | boolean> | undefined>;
|
||
|
|
export const inputDialog: inputDialog = async (heading, rows) => await exports.ox_lib.inputDialog(heading, rows);
|