From a5212f0f5e8fda87c9aed63e6d4d42424e9a7cd9 Mon Sep 17 00:00:00 2001 From: Jakub Kottnauer Date: Mon, 24 Jun 2024 12:49:08 +0200 Subject: [PATCH] Unify submit button styles and change cursor on account group (#905) --- app/views/accounts/_account_list.html.erb | 2 +- app/views/imports/index.html.erb | 3 ++- app/views/merchants/index.html.erb | 6 ++++-- app/views/pages/dashboard.html.erb | 2 +- app/views/settings/profiles/show.html.erb | 2 +- app/views/transactions/searches/_menu.html.erb | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/views/accounts/_account_list.html.erb b/app/views/accounts/_account_list.html.erb index 9e2e9c0f..d5a15daf 100644 --- a/app/views/accounts/_account_list.html.erb +++ b/app/views/accounts/_account_list.html.erb @@ -2,7 +2,7 @@ <% type = Accountable.from_type(group.name) %> <% if group %>
- + <%= lucide_icon("chevron-down", class: "hidden group-open:block text-gray-500 w-5 h-5") %> <%= lucide_icon("chevron-right", class: "group-open:hidden text-gray-500 w-5 h-5") %>
<%= type.model_name.human %>
diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb index 97d1ee7e..3406f8c2 100644 --- a/app/views/imports/index.html.erb +++ b/app/views/imports/index.html.erb @@ -5,7 +5,8 @@

<%= t(".title") %>

- <%= link_to new_import_path(enable_type_selector: true), class: "flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2 pr-3", data: { turbo_frame: "modal" } do %> + + <%= link_to new_import_path(enable_type_selector: true), class: "rounded-lg bg-gray-900 text-white flex items-center gap-1 justify-center hover:bg-gray-700 px-3 py-2", data: { turbo_frame: :modal } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= t(".new") %> <% end %> diff --git a/app/views/merchants/index.html.erb b/app/views/merchants/index.html.erb index c9a725b7..0629c818 100644 --- a/app/views/merchants/index.html.erb +++ b/app/views/merchants/index.html.erb @@ -1,10 +1,12 @@ <% content_for :sidebar do %> <%= render "settings/nav" %> <% end %> +
-

<%= t(".title") %>

- <%= link_to new_merchant_path, class: "flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2 pr-3", data: { turbo_frame: "modal" } do %> +

<%= t(".title") %>

+ + <%= link_to new_merchant_path, class: "rounded-lg bg-gray-900 text-white flex items-center gap-1 justify-center hover:bg-gray-700 px-3 py-2", data: { turbo_frame: :modal } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= t(".new_short") %> <% end %> diff --git a/app/views/pages/dashboard.html.erb b/app/views/pages/dashboard.html.erb index a240cc97..9296f5f8 100644 --- a/app/views/pages/dashboard.html.erb +++ b/app/views/pages/dashboard.html.erb @@ -7,7 +7,7 @@

<%= t(".subtitle") %>

<% end %>
- <%= link_to new_account_path, class: "flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2 pr-3", data: { turbo_frame: "modal" } do %> + <%= link_to new_account_path, class: "flex text-white text-sm font-medium items-center gap-1 bg-gray-900 hover:bg-gray-700 rounded-lg p-2 pr-3", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= t(".new") %> <% end %> diff --git a/app/views/settings/profiles/show.html.erb b/app/views/settings/profiles/show.html.erb index 64e0959f..e829761b 100644 --- a/app/views/settings/profiles/show.html.erb +++ b/app/views/settings/profiles/show.html.erb @@ -36,7 +36,7 @@ <%= form.text_field :last_name, placeholder: "Last name", value: Current.user.last_name, label: true %>
- <%= form.submit t(".save"), class: "bg-gray-900 text-white rounded-lg px-3 py-2" %> + <%= form.submit t(".save"), class: "bg-gray-900 hover:bg-gray-700 cursor-pointer text-white rounded-lg px-3 py-2" %>
<% end %> diff --git a/app/views/transactions/searches/_menu.html.erb b/app/views/transactions/searches/_menu.html.erb index 48950c19..7f04a39b 100644 --- a/app/views/transactions/searches/_menu.html.erb +++ b/app/views/transactions/searches/_menu.html.erb @@ -31,7 +31,7 @@ <%= button_tag type: "reset", data: { action: "menu#close" }, class: "py-2 px-3 bg-gray-50 rounded-lg text-sm text-gray-900 font-medium" do %> Cancel <% end %> - <%= form.submit "Apply", name: nil, class: "py-2 px-3 bg-gray-900 rounded-lg text-sm text-white font-medium" %> + <%= form.submit "Apply", name: nil, class: "py-2 px-3 bg-gray-900 hover:bg-gray-700 rounded-lg text-sm text-white font-medium cursor-pointer" %>