You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/custom-elements/samples/reflect-attributes/my-widget.svelte

24 lines
268 B

<svelte:options
customElement={{
tag: "my-widget",
props: { red: { reflect: true } },
}}
/>
<script>
export let red = false;
red;
</script>
<div>hi</div>
<p>hi</p>
<style>
:host([red]) div {
color: red;
}
:host([white]) p {
color: white;
}
</style>