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() { function handleMouseover() {
dispatch('mouseover', info); dispatch('mouseover', info);
} }
function handleMouseout() {
dispatch('mouseout');
}
</script> </script>
<div <div
class="p-3 cursor-pointer text-center" class="p-3 cursor-pointer text-center"
on:mouseenter={handleMouseover} on:mouseenter={handleMouseover}
on:mouseleave={handleMouseout}
> >
<i class='{icon} fa-xl'></i> <i class='{icon} fa-xl'></i>
</div> </div>

View File

@ -22,7 +22,7 @@
} }
</script> </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"> <div class="flex flex-col shrink-0 w-14 text-gray-300">
{#each icons as i} {#each icons as i}
{#if i} {#if i}