mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 23:16:03 +01:00
chore(package): add missing typings
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types';
|
||||
|
||||
// Should really be improved at some point to only display properties depending on the input type
|
||||
interface InputDialogRowProps {
|
||||
type: 'input' | 'number' | 'checkbox' | 'select' | 'slider';
|
||||
type:
|
||||
| 'input'
|
||||
| 'number'
|
||||
| 'checkbox'
|
||||
| 'select'
|
||||
| 'multi-select'
|
||||
| 'slider'
|
||||
| 'color'
|
||||
| 'date'
|
||||
| 'date-range'
|
||||
| 'time'
|
||||
| 'text-area';
|
||||
label: string;
|
||||
options?: { value: string; label: string; default?: string }[];
|
||||
password?: boolean;
|
||||
@@ -13,13 +25,19 @@ interface InputDialogRowProps {
|
||||
checked?: boolean;
|
||||
min?: number;
|
||||
max?: number;
|
||||
autosize?: boolean;
|
||||
step?: number;
|
||||
required?: boolean;
|
||||
format?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
type inputDialog = (
|
||||
heading: string,
|
||||
rows: string[] | InputDialogRowProps[]
|
||||
rows: string[] | InputDialogRowProps[],
|
||||
options: {
|
||||
allowCancel?: boolean;
|
||||
}
|
||||
) => Promise<Array<string | number | boolean> | undefined>;
|
||||
export const inputDialog: inputDialog = async (heading, rows) => await exports.ox_lib.inputDialog(heading, rows);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user