fix(interface): Add table<string, string> to icon typings (#261)

This commit is contained in:
Diogo Manuel Coelho Morais dos Santos
2023-03-10 19:38:34 +00:00
committed by GitHub
parent c011d51184
commit fc6a95c73c
7 changed files with 8 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ local openContextMenu = nil
---@class ContextMenuItem
---@field title? string
---@field menu? string
---@field icon? string
---@field icon? string | {[1]: IconProp, [2]: string};
---@field iconColor? string
---@field onSelect? fun(args: any)
---@field arrow? boolean

View File

@@ -5,7 +5,7 @@ local input
---@field label string
---@field options? { value: string, label: string, default?: string }[]
---@field password? boolean
---@field icon? string
---@field icon? string | {[1]: IconProp, [2]: string};
---@field iconColor? string
---@field placeholder? string
---@field default? string | number

View File

@@ -1,3 +1,5 @@
---@alias IconProp 'fas' | 'far' | 'fal' | 'fat' | 'fad' | 'fab' | 'fak' | 'fass'
local keepInput = IsNuiFocusKeepingInput()
function lib.setNuiFocus(allowInput, disableCursor)

View File

@@ -8,7 +8,7 @@ local openMenu
---@class MenuOptions
---@field label string
---@field icon? string
---@field icon? string | {[1]: IconProp, [2]: string};
---@field checked? boolean
---@field values? table<string | { label: string, description: string }>
---@field description? string

View File

@@ -9,7 +9,7 @@
---@field position? NotificationPosition
---@field type? NotificationType
---@field style? { [string]: any }
---@field icon? string;
---@field icon? string | {[1]: IconProp, [2]: string};
---@field iconColor? string;
---@param data NotifyProps

View File

@@ -1,6 +1,6 @@
---@class RadialMenuItem
---@field id string
---@field icon string
---@field icon string | {[1]: IconProp, [2]: string};
---@field label string
---@field menu? string
---@field onSelect? fun(currentMenu: string | nil, itemIndex: number) | string

View File

@@ -1,6 +1,6 @@
---@class TextUIOptions
---@field position? 'right-center' | 'left-center' | 'top-center';
---@field icon? string;
---@field icon? string | {[1]: IconProp, [2]: string};
---@field iconColor? string;
---@field style? string;