Skip to content

Commit

Permalink
fix layout shift when opening dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
samluiz committed May 27, 2024
1 parent efc202e commit f77bab5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions frontend/src/components/BalanceTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const closeDropdown = () => {

<template>
<div
class="flex flex-col justify-self-end gap-2 text-sm min-w-44"
class="flex flex-col justify-self-end gap-2 text-sm min-w-44 relative"
@mouseover="openDropdown"
@mouseleave="closeDropdown"
>
Expand All @@ -39,16 +39,12 @@ const closeDropdown = () => {
}"
>
<span>Balance: {{ maskCurrency(balance) }}</span>
<span
class="ml-2 opacity-50 duration-200"
:class="{
'opacity-100': isDropdownOpen,
}"
>&#128712;</span
>
</div>
<transition name="fade">
<div class="grid grid-flow-row gap-2 min-w-44" v-if="isDropdownOpen">
<div
class="grid grid-flow-row gap-2 min-w-44 mt-11 absolute z-50"
v-show="isDropdownOpen"
>
<span
class="p-2 rounded-md bg-green-600 bg-opacity-50 hover:bg-opacity-100 duration-200"
>Total Earnings: {{ maskCurrency(earnings_subtotal) }}</span
Expand Down

0 comments on commit f77bab5

Please sign in to comment.