Centralize handling of mouseleave to hide the side-panel

This commit is contained in:
Alessandro Pignotti 2024-10-11 08:17:52 +02:00
parent f1ef46cda1
commit fc64f9f987
2 changed files with 1 additions and 6 deletions

View file

@ -8,16 +8,11 @@
function handleMouseover() {
dispatch('mouseover', info);
}
function handleMouseout() {
dispatch('mouseout');
}
</script>
<div
class="p-3 cursor-pointer text-center"
on:mouseenter={handleMouseover}
on:mouseleave={handleMouseout}
>
<i class='{icon} fa-xl'></i>
</div>

View file

@ -22,7 +22,7 @@
}
</script>
<div class="flex flex-row w-14 bg-neutral-700">
<div class="flex flex-row w-14 bg-neutral-700" on:mouseleave={hideInfo}>
<div class="flex flex-col shrink-0 w-14 text-gray-300">
{#each icons as i}
{#if i}