cancel
Description
sets the function that closes a popupType
function
Example
<script>
import { Button, Popup} from "wx-svelte-core";
let showPopup = false;
function onclick() {
showPopup = true;
}
function oncancel() {
showPopup = false;
}
</script>
<div>
<Button {onclick}>Show Popup</Button>
</div>
{#if showPopup}
<Popup {onclick} {oncancel}>
<div class="popup">
<p>Some text here and there</p>
</div>
</Popup>
{/if}
Related article: Showing/hiding Popup
Related sample: Popup