Skip to content

@jsvision/ui / cancelButton

Function: cancelButton() ​

cancelButton(i18n?): Button

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

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

Parameters ​

i18n? ​

I18n

Translation service for the built-in label; defaults to isolated English UI text.

Returns ​

Button

A Button labelled Cancel.

Example ​

ts
import { Dialog, cancelButton, at } from '@jsvision/ui';
const dialog = new Dialog({ title: ' Confirm ', width: 30, height: 8 });
const cancel = at(cancelButton(), 18, 4, 12, 2);
dialog.add(cancel);