Skip to content

@jsvision/ui / yesNoButtons

Function: yesNoButtons()

yesNoButtons(i18n?): [Button, Button]

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

The Yes + No pair, in tab/z order (Yes first).

Parameters

i18n?

I18n

Translation service shared by both buttons; defaults to isolated English UI text.

Returns

[Button, Button]

A [yesButton, noButton] tuple ready to lay out and add.

Example

ts
import { Dialog, yesNoButtons, at } from '@jsvision/ui';
const dialog = new Dialog({ title: ' Confirm ', width: 30, height: 8 });
const [yes, no] = yesNoButtons();
at(yes, 6, 4, 10, 2);
at(no, 18, 4, 10, 2);
dialog.add(yes);
dialog.add(no);