1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Categories, tags, merchants, and menus improvements (#1135)

This commit is contained in:
Zach Gollwitzer 2024-08-27 17:06:41 -04:00 committed by GitHub
parent f82ce59dad
commit 38c2b4670c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 250 additions and 210 deletions

View file

@ -1,6 +1,6 @@
module MenusHelper
def contextual_menu(&block)
tag.div class: "relative cursor-pointer", data: { controller: "menu" } do
tag.div data: { controller: "menu" } do
concat contextual_menu_icon
concat contextual_menu_content(&block)
end
@ -25,13 +25,14 @@ module MenusHelper
private
def contextual_menu_icon
tag.button class: "flex hover:bg-gray-100 p-2 rounded", data: { menu_target: "button" } do
tag.button class: "flex hover:bg-gray-100 p-2 rounded cursor-pointer", data: { menu_target: "button" } do
lucide_icon "more-horizontal", class: "w-5 h-5 text-gray-500"
end
end
def contextual_menu_content(&block)
tag.div class: "absolute z-10 top-10 right-0 border border-alpha-black-25 bg-white rounded-lg shadow-xs hidden", data: { menu_target: "content" } do
tag.div class: "z-50 border border-alpha-black-25 bg-white rounded-lg shadow-xs hidden",
data: { menu_target: "content" } do
capture(&block)
end
end