-
Notifications
You must be signed in to change notification settings - Fork 16
/
_list.html.erb
29 lines (29 loc) · 1.31 KB
/
_list.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<div class="sticky top-16 bg-white overflow-x-hidden overflow-y-auto no-scrollbar shrink-0 border-r border-slate-200 w-80 h-[100vh]">
<div>
<div class="sticky top-0 z-10">
<div class="flex items-center bg-white border-b border-slate-200 px-5 h-16">
<div class="w-full flex items-center justify-between">
<div class="relative">
<h1 class="font-semibold text-slate-800">
<%= link_to "Products", kit_products_path %>
</h1>
</div>
<%= link_to new_kit_product_path,
aria: { label: "New product" },
data: { turbo_frame: "#{Kit::Product.model_name.singular}_form" },
class: "p-1.5 shrink-0 rounded border border-slate-200 hover:border-slate-300 shadow-sm ml-2" do %>
<svg class="w-4 h-4 fill-current" viewBox="0 0 16 16">
<path d="M15 7H9V1c0-.6-.4-1-1-1S7 .4 7 1v6H1c-.6 0-1 .4-1 1s.4 1 1 1h6v6c0 .6.4 1 1 1s1-.4 1-1V9h6c.6 0 1-.4 1-1s-.4-1-1-1z"></path>
</svg>
<% end %>
</div>
</div>
</div>
<div class="px-5 py-4">
<%= render SearchListComponent.new do |c| %>
<%= c.with_form(ransack: @q) %>
<%= @kit_products.each { |kit_product| c.with_item(kit_product) } %>
<% end %>
</div>
</div>
</div>