1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 23:45:21 +02:00

fixing icons sizing and container sizing in android

This commit is contained in:
Luan Estradioto 2025-04-14 19:12:31 -03:00
parent 4a8adacc6d
commit 1d9f1d5670
3 changed files with 9 additions and 9 deletions

View file

@ -21,7 +21,7 @@ module FormsHelper
periods_for_select = Period.all.map { |period| [ period.label_short, period.key ] }
form.select(:period, periods_for_select, { selected: selected.key }, class: classes, data: { "auto-submit-form-target": "auto" })
end
end
def currencies_for_select
@ -31,7 +31,7 @@ end
private
def radio_tab_contents(label:, icon:)
tag.div(class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued group-has-checked:bg-container group-has-checked:text-gray-800 group-has-checked:shadow-sm") do
concat lucide_icon(icon, class: "w-4 h-4 sm:w-5 sm:h-5")
concat lucide_icon(icon, class: "w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0")
concat tag.span(label, class: "group-has-checked:font-semibold")
end
end

View file

@ -4,12 +4,12 @@
<%= render "shared/form_errors", model: entry %>
<% end %>
<section>
<fieldset class="bg-gray-50 rounded-lg p-1 grid grid-flow-row min-[360px]:grid-flow-col justify-stretch gap-x-2 text-sm sm:text-base">
<section >
<fieldset class="bg-surface rounded-lg p-1 grid grid-flow-row min-[360px]:grid-flow-col min-[360px]:grid-cols-3 justify-stretch gap-x-2 text-sm sm:text-base w-full">
<%= radio_tab_tag form: f, name: :nature, value: :outflow, label: t(".expense"), icon: "minus-circle", checked: params[:nature] == "outflow" || params[:nature].nil? %>
<%= radio_tab_tag form: f, name: :nature, value: :inflow, label: t(".income"), icon: "plus-circle", checked: params[:nature] == "inflow" %>
<%= link_to new_transfer_path, data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued group-has-checked:bg-container group-has-checked:text-gray-800 group-has-checked:shadow-sm" do %>
<%= lucide_icon "arrow-right-left", class: "w-4 h-4 sm:w-5 sm:h-5" %>
<%= lucide_icon "arrow-right-left", class: "w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0" %>
<%= tag.span t(".transfer") %>
<% end %>
</fieldset>

View file

@ -7,19 +7,19 @@
<% end %>
<section>
<fieldset class="bg-gray-50 rounded-lg p-1 grid grid-flow-row min-[360px]:grid-flow-col justify-stretch gap-x-2 text-sm sm:text-base">
<fieldset class="bg-surface rounded-lg p-1 grid grid-flow-row min-[360px]:grid-flow-col min-[360px]:grid-cols-3 justify-stretch gap-x-2 text-sm sm:text-base w-full">
<%= link_to new_transaction_path(nature: "outflow"), data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued" do %>
<%= lucide_icon "minus-circle", class: "w-4 h-4 sm:w-5 sm:h-5" %>
<%= lucide_icon "minus-circle", class: "w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0" %>
<%= tag.span t(".expense") %>
<% end %>
<%= link_to new_transaction_path(nature: "inflow"), data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued" do %>
<%= lucide_icon "plus-circle", class: "w-4 h-4 sm:w-5 sm:h-5" %>
<%= lucide_icon "plus-circle", class: "w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0" %>
<%= tag.span t(".income") %>
<% end %>
<%= tag.div class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued bg-container text-gray-800 shadow-sm" do %>
<%= lucide_icon "arrow-right-left", class: "w-4 h-4 sm:w-5 sm:h-5" %>
<%= lucide_icon "arrow-right-left", class: "w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0" %>
<%= tag.span t(".transfer") %>
<% end %>
</fieldset>