mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-06 05:55:21 +02:00
* Add Tooltip Stimulus controller * Add test for tooltip * Remove comma * Normalize translations * Use floating-ui instead popper * Use component classes * Increase cross axis value * Cleanup * Update app/views/accounts/show.html.erb Use correct tailwind class Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com> Signed-off-by: Tony Vincent <tonyvince7@gmail.com> * Use default values for options * Remove tooltip global variable * Add arrow target * Remove unused method --------- Signed-off-by: Tony Vincent <tonyvince7@gmail.com> Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
26 lines
995 B
Text
26 lines
995 B
Text
<%# locals: (account:) -%>
|
|
<div data-controller="tooltip" data-tooltip-target="element" data-tooltip-placement-value="right" data-tooltip-offset-value=10 data-tooltip-cross-axis-value=50>
|
|
<%= lucide_icon("info", class: "w-4 h-4 shrink-0 text-gray-500") %>
|
|
<div id="tooltip" role="tooltip" data-tooltip-target="tooltip" class="tooltip bg-gray-700 text-sm p-2 rounded w-64">
|
|
<div class="text-white">
|
|
<%= t(".total_value_tooltip") %>
|
|
</div>
|
|
<div class="flex pt-3">
|
|
<div class="text-gray-300">
|
|
<%= t(".holdings") %>
|
|
</div>
|
|
<div class="text-white ml-auto">
|
|
<%= tag.p format_money(account.investment.holdings_value, precision: 0) %>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="text-gray-300">
|
|
<%= t(".cash") %>
|
|
</div>
|
|
<div class="text-white ml-auto">
|
|
<%= tag.p format_money(account.balance_money, precision: 0) %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div data-tooltip-target="arrow"></div>
|
|
</div>
|