cancel
Description
oncancel event fires on click outside the side areaExample
<script>
import { Button, SideArea } from "wx-svelte-core";
let sideAreaVisible = false;
function openSideArea() {
sideAreaVisible = true;
}
function closeSideArea() {
sideAreaVisible = false;
}
</script>
<div>
<Button onclick={openSideArea}>Show Side Area</Button>
</div>
{#if sideAreaVisible}
<SideArea oncancel={closeSideArea}>
<!-- Some content -->
</SideArea>
{/if}
Related article: Handling SideArea closing