kor TürkçeGitHub

Confirm

Asks a question and resolves to a boolean answer.

kor/ui/ConfirmSource

When to use

  • Confirm a consequential action before applying it.

Examples

Ask for confirmation

Loading the example

<k:Button text="Discard the draft" press=".onConfirm"/>

Require a record code

Loading the example

<k:Button text="Remove shipment" press=".onConfirm"/>

API

Methods

NameDescription
ask(options: ConfirmOptions): Promise<boolean>Resolves to true when the user confirms, or false when they cancel or dismiss
type ConfirmOptions = {
	title: string;
	text?: string;
	confirmText?: string;
	cancelText?: string;
	danger?: boolean;
	/** Verilirse kullanıcı bunu yazmadan onaylayamaz */
	type?: string;
};

Related

DialogHoldButton