Skip to content

@jsvision/ui / yesNoButtons

Function: yesNoButtons()

yesNoButtons(): [Button, Button]

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

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

Returns

[Button, Button]

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

Example

ts
import { yesNoButtons } from '@jsvision/ui';
const [yes, no] = yesNoButtons();
yes.layout = { position: 'absolute', rect: { x: 6, y: 4, width: 10, height: 2 } };
no.layout = { position: 'absolute', rect: { x: 18, y: 4, width: 10, height: 2 } };
dialog.add(yes);
dialog.add(no);