Skip to main content

ok

Description

a function which is called on click of the OK 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