Skip to main content

buttons

Description

an array of buttons for a modal box

Type

array

Default value

["cancel", "ok"]

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} buttons={["ok"]}>
<Text select={true} focus={true} value="Some" />
</Modal>
</Portal>
{/if}

Related article: Providing the buttons' functionality

Related sample: Messages