Skip to main content

Interface: MenuItem

Defined in: src/ui/elements/PcMenu/index.ts:16

An item in a menu that can be chosen

Properties​

checked?​

optional checked?: boolean

Defined in: src/ui/elements/PcMenu/index.ts:26

Makes the item a toggle, showing a checkmark on its left while on


danger?​

optional danger?: boolean

Defined in: src/ui/elements/PcMenu/index.ts:24

Shown in the cancelling colour, e.g. for deleting


disabled?​

optional disabled?: boolean

Defined in: src/ui/elements/PcMenu/index.ts:22


icon?​

optional icon?: string

Defined in: src/ui/elements/PcMenu/index.ts:28

Name of an icon to show on its left (see icons), when it isn't a toggle


image?​

optional image?: string

Defined in: src/ui/elements/PcMenu/index.ts:33

An image whose shape (its alpha) shows on its left in the text's colour, when it isn't a toggle and has no icon, e.g. a brush shape (a URL or data URL)


label​

label: string

Defined in: src/ui/elements/PcMenu/index.ts:21


selected?​

optional selected?: boolean

Defined in: src/ui/elements/PcMenu/index.ts:37

Marks the current choice (e.g. the selected tool) with the selected class and a purple background


shortcut?​

optional shortcut?: KeyCombo

Defined in: src/ui/elements/PcMenu/index.ts:35

The action's keyboard shortcut, shown on its right as symbols (e.g. ⌘S) when 3 characters or fewer


type?​

optional type?: "item"

Defined in: src/ui/elements/PcMenu/index.ts:18

Optional; items are the default kind of menu entry


value​

value: string

Defined in: src/ui/elements/PcMenu/index.ts:20

What pc-select gives when it's chosen