Skip to content

@jsvision/ui / cancelButton

Function: cancelButton()

cancelButton(): Button

Defined in: ui/src/dialog/buttons.ts:47

A Cancel button — emits Commands.cancel (the same command Esc and the frame close-box resolve to).

Returns

Button

A Button labelled Cancel.

Example

ts
import { cancelButton } from '@jsvision/ui';
const cancel = cancelButton();
cancel.layout = { position: 'absolute', rect: { x: 18, y: 4, width: 12, height: 2 } };
dialog.add(cancel);