Skip to main content

cancel

Description

a function which is called on click of the Cancel button

Type

function

Example

<script>
import { Modal, Text, Portal, Button } from "@wx/svelte-core";

let custom1;
function hideAll() {
custom1 = false;
}
</script>

{#if custom1}
<Portal>
<Modal title="Custom Prompt" ok={hideAll} cancel={hideAll}>
<Text select={true} focus={true} value="Some" />
</Modal>
</Portal>
{/if}

Related article: Providing the buttons' functionality

Related sample: Messages