mirror of https://github.com/sveltejs/svelte
16 lines
200 B
16 lines
200 B
6 years ago
|
<script>
|
||
|
let hovering;
|
||
|
|
||
|
function enter() {
|
||
|
hovering = true;
|
||
|
}
|
||
|
|
||
|
function leave() {
|
||
|
hovering = false;
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<div on:mouseenter={enter} on:mouseleave={leave}>
|
||
2 years ago
|
<slot {hovering} />
|
||
|
</div>
|