app/components/solidus_admin/ui/panel/component.html.erb in solidus_admin-0.0.2 vs app/components/solidus_admin/ui/panel/component.html.erb in solidus_admin-0.1.0
- old
+ new
@@ -6,31 +6,45 @@
border
border-gray-100
flex-col
justify-start
items-start
- gap-6
inline-flex
w-full
- py-6
+ relative
"
data-controller="<%= stimulus_id %>"
>
+ <% if menus? %>
+ <%= render component('ui/dropdown').new(
+ size: :s,
+ class: "absolute top-0 right-0 m-6",
+ ).with_content(safe_join(menus)) %>
+ <% end %>
+
<% if @title %>
- <h2 class="mt-0 px-6 w-full">
- <span class="body-title"><%= @title %></span>
- <%= render component('ui/toggletip').new(text: @title_hint, position: :left) if @title_hint %>
- </h2>
+ <section class="border-gray-100 border-t w-full first-of-type:border-t-0 p-6">
+ <h2>
+ <span class="font-semibold text-xl"><%= @title %></span>
+ <%= render component("ui/toggletip").new(text: @title_hint) if @title_hint %>
+ </h2>
+ </section>
<% end %>
- <% if content&.present? %>
- <div class="px-6 w-full flex flex-col gap-6">
+ <% sections.each do |section| %>
+ <%= section %>
+ <% end %>
+
+ <% if content.present? %>
+ <section class="border-gray-100 border-t w-full first-of-type:border-t-0 p-6">
<%= content %>
- </div>
+ </section>
<% end %>
<% if action? %>
- <div class="flex gap-2 items-center border-t border-gray-100 px-6 pt-6 w-full">
- <%= action %>
- </div>
+ <section class="border-gray-100 border-t w-full first-of-type:border-t-0 p-6">
+ <div class="flex justify-between items-center">
+ <%= action %>
+ </div>
+ </section>
<% end %>
</div>