@jsvision/ui / ButtonActivation
Interface: ButtonActivation
Defined in: ui/src/controls/button.ts:45
Read-only activation metadata for a Button.
The descriptor intentionally reports whether a callback is bound without exposing the callback itself. Headless inspectors can therefore identify an action without invoking application code.
Example
ts
import { Button } from '@jsvision/ui';
const save = new Button('~S~ave', { command: 'file.save', onClick: () => console.log('saved') });
console.log(save.activation);
// { label: 'Save', command: 'file.save', hasCallback: true }Properties
command
readonlycommand:string|null
Defined in: ui/src/controls/button.ts:49
Configured command, or null when activation is callback-only.
hasCallback
readonlyhasCallback:boolean
Defined in: ui/src/controls/button.ts:51
Whether activation invokes an application callback in addition to any command.
label
readonlylabel:string
Defined in: ui/src/controls/button.ts:47
Visible label after accelerator markers have been removed.