mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(interface/menu): checkbox
feat(package/interface/menu): checkbox feat(web/menu/list): checkbox feat(web/menu/list): checkbox option for ListItem feat(web/menu/list): custom checkbox
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types';
|
||||
|
||||
type MenuPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
||||
type ChangeFunction = (selected: number, scrollIndex: number | null, args: any | null) => void;
|
||||
type ChangeFunction = (selected: number, scrollIndex?: number, args?: any, checked?: boolean) => void;
|
||||
|
||||
interface MenuOptions {
|
||||
label: string;
|
||||
icon?: IconName | [IconPrefix, IconName];
|
||||
checked?: boolean;
|
||||
values?: Array<string | { label: string; description: string }>;
|
||||
description?: string;
|
||||
defaultIndex?: number;
|
||||
@@ -23,6 +24,7 @@ interface MenuProps {
|
||||
onClose?: (keyPressed?: 'Escape' | 'Backspace') => void;
|
||||
onSelected?: ChangeFunction;
|
||||
onSideScroll?: ChangeFunction;
|
||||
onChecked?: ChangeFunction;
|
||||
cb?: ChangeFunction;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user