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:
BerkieBb authored and Luke committed 2022-10-29 15:55:08 +02:00
1 parent de23227ea7
commit 5ba1a3b8f9
5 files changed
+125 -30

No files matched your search

+3 -1
View File
@@ -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;
}