theme
Description
applies the specified theme for a component moved via the portalType
string
Values
"material" | "willow" | "willow-dark"
Example
<script>
import { Modal, TextArea, Portal, Button } from "wx-svelte-core";
let custom, box;
function hideAll() {
custom = false;
}
</script>
<Button click={() => (custom = !custom)}>Show Dialog</Button>
{#if custom}
<Portal theme={"willow-dark"}>
<Modal>
Some text here
<TextArea placeholder="Some text" />
<div slot="buttons" style="margin-top: 20px;">
<Button click={hideAll}>Yes</Button>
<Button click={hideAll}>No</Button>
<Button click={hideAll}>Maybe</Button>
</div>
</Modal>
</Portal>
{/if}
Related article: Setting the theme for a moved component