diff --git a/admin/app/assets/stylesheets/solidus_admin/dark.css b/admin/app/assets/stylesheets/solidus_admin/dark.css
index e03ce11406e..138e31cddf5 100644
--- a/admin/app/assets/stylesheets/solidus_admin/dark.css
+++ b/admin/app/assets/stylesheets/solidus_admin/dark.css
@@ -9,4 +9,5 @@ html {
main img {
filter: invert(100%) hue-rotate(-180deg);
+ background-color: #fff;
}
diff --git a/admin/app/assets/stylesheets/solidus_admin/dimmed.css b/admin/app/assets/stylesheets/solidus_admin/dimmed.css
index 48f987743f8..195381014cb 100644
--- a/admin/app/assets/stylesheets/solidus_admin/dimmed.css
+++ b/admin/app/assets/stylesheets/solidus_admin/dimmed.css
@@ -8,4 +8,5 @@ html {
main img {
filter: invert(91%) brightness(1.5) contrast(1.5) hue-rotate(-180deg);
+ background-color: #ddd;
}
diff --git a/admin/app/components/solidus_admin/ui/button/component.rb b/admin/app/components/solidus_admin/ui/button/component.rb
index 1a1fd0433c2..1110b4ef01f 100644
--- a/admin/app/components/solidus_admin/ui/button/component.rb
+++ b/admin/app/components/solidus_admin/ui/button/component.rb
@@ -78,7 +78,7 @@ def initialize(
@attributes[:class] = [
'justify-start items-center justify-center gap-1 inline-flex rounded',
- 'focus:ring focus:ring-gray-300 focus:ring-0.5 focus:bg-white focus:ring-offset-0 [&:focus-visible]:outline-none',
+ 'focus:ring focus:ring-gray-300 focus:ring-0.5 focus:ring-offset-0 [&:focus-visible]:outline-none',
SIZES.fetch(size.to_sym),
(TEXT_PADDINGS.fetch(size.to_sym) if @text),
SCHEMES.fetch(scheme.to_sym),
diff --git a/admin/app/components/solidus_admin/ui/panel/component.html.erb b/admin/app/components/solidus_admin/ui/panel/component.html.erb
index 041c3e95ea1..e43ed7ff3ec 100644
--- a/admin/app/components/solidus_admin/ui/panel/component.html.erb
+++ b/admin/app/components/solidus_admin/ui/panel/component.html.erb
@@ -22,29 +22,18 @@
<% end %>
<% if @title %>
-
+ <%= render_section do %>
- <%= @title %>
+ <%= @title %>
<%= render component("ui/toggletip").new(text: @title_hint) if @title_hint %>
-
+ <% end %>
<% end %>
<% sections.each do |section| %>
<%= section %>
<% end %>
- <% if content.present? %>
-
- <% end %>
-
- <% if action? %>
-
- <% end %>
+ <%= render_section { content } if content.present? %>
+ <%= render_section { tag.div(action, class: "flex justify-between items-center") } if action? %>
diff --git a/admin/app/components/solidus_admin/ui/panel/component.rb b/admin/app/components/solidus_admin/ui/panel/component.rb
index b2f353eca07..e721ce10e25 100644
--- a/admin/app/components/solidus_admin/ui/panel/component.rb
+++ b/admin/app/components/solidus_admin/ui/panel/component.rb
@@ -10,13 +10,8 @@ class SolidusAdmin::UI::Panel::Component < SolidusAdmin::BaseComponent
)
}
- renders_many :sections, ->(wide: false, high: false, **args, &block) do
- tag.section(**args, class: "
- border-gray-100 border-t w-full first-of-type:border-t-0
- #{'px-6' unless wide}
- #{'py-6' unless high}
- #{args[:class]}
- ", &block)
+ renders_many :sections, ->(**args, &block) do
+ render_section(**args, &block)
end
renders_many :menus, ->(name, url, **args) do
@@ -33,4 +28,13 @@ def initialize(title: nil, title_hint: nil)
@title = title
@title_hint = title_hint
end
+
+ def render_section(wide: false, high: false, **args, &block)
+ tag.section(**args, class: "
+ border-gray-100 border-t w-full first-of-type:border-t-0
+ #{'px-6' unless wide}
+ #{'py-4' unless high}
+ #{args[:class]}
+ ", &block)
+ end
end