mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(package): interface definitions
This commit is contained in:
22
package/client/resource/interface/input.ts
Normal file
22
package/client/resource/interface/input.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user