1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 21:29:38 +02:00

Currency Dropdown (#415)

* Initial dropdown setup and styles

* Allow form field to pass through block content and update dropdown posititon

* add currency to accounts params

* Add repositionDropdown function and carry over dropdown controller

* remove block context from form builder in favour of using form tag directly

* Hide currency input and set checks for input and label before updating

* align currency button with balance

* revert form_field_tag changes

* remove margin on currency button, looks cleaner

---------

Signed-off-by: Josh Pigford <josh@joshpigford.com>
Co-authored-by: Josh Pigford <josh@joshpigford.com>
This commit is contained in:
Cristiano Crolla 2024-02-11 19:02:27 +00:00 committed by GitHub
parent b2fdf78101
commit 96debfaeda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 86 additions and 3 deletions

View file

@ -18,6 +18,10 @@ module ApplicationHelper
render partial: "shared/modal", locals: { content: content }
end
def currency_dropdown(f: nil, options: [])
render partial: "shared/currency_dropdown", locals: { f: f, options: options }
end
def sidebar_link_to(name, path, options = {})
base_class_names = [ "block", "border", "border-transparent", "rounded-xl", "-ml-2", "p-2", "text-sm", "font-medium", "text-gray-500", "flex", "items-center" ]
hover_class_names = [ "hover:bg-white", "hover:border-[#141414]/[0.07]", "hover:text-gray-900", "hover:shadow-xs" ]