forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcomponent.html.erb
29 lines (28 loc) · 1.22 KB
/
component.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>
<nav aria-label="pagination">
<ul class="flex items-center">
<li>
<% if @page.first? %>
<span class="<%= link_classes(rounded: :left) %>", "aria-label"=<%= t(".prev") %>, "aria-disabled"=true>
<%= icon_tag("arrow-left-s-line", class: "fill-current text-grey-400 w-5 h-5", "aria-hidden" => true) %>
</span>
<% else %>
<%= link_to @path.call(@page.number - 1), class: link_classes(rounded: :left), "aria-label" => t(".prev") do %>
<%= icon_tag("arrow-left-s-line", class: "w-5 h-5", "aria-hidden" => true) %>
<% end %>
<% end %>
</li>
<li>
<% if @page.last? %>
<span class="<%= link_classes(rounded: :right) %>", "aria-label"=<%= t(".next") %>, "aria-disabled"=true>
<%= icon_tag("arrow-right-s-line", class: "fill-current text-grey-400 w-5 h-5", "aria-hidden" => true) %>
</span>
<% else %>
<%= link_to @path.call(@page.next_param), class: link_classes(rounded: :right), "aria-label" => t(".next") do %>
<%= icon_tag("arrow-right-s-line", class: "w-5 h-5", "aria-hidden" => true) %>
<% end %>
<% end %>
</li>
</ul>
</nav>
</div>