refactor(client/radial): allow onSelect as string to call an export

e.g. onSelect = 'menuHandler'
exports('menuHandler', function(menu, item) end)
This commit is contained in:
Linden
2023-02-26 02:23:01 +11:00
parent 2000654546
commit 79e91ee452
2 changed files with 13 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ type RadialItem = {
id: string;
label: string;
icon: IconName | [IconPrefix, IconName];
onSelect?: (currentMenu: string | null, itemIndex: number) => void;
onSelect?: (currentMenu: string | null, itemIndex: number) => void | string;
menu?: string;
};