Previews

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
<% if truncate_label == :truncate %>
<div style="margin-bottom:1rem">
<%= render(
Primer::Alpha::Banner.new(
scheme: :warning,
description: 'If you must use truncation, ensure that users can still access the truncated content in an accessible manner, as truncation should be used sparingly.'
)
) { "Inaccessible pattern" } %>
</div>
<% end %>
<%= render(Primer::Beta::NavList.new(aria: { label: "List heading" })) do |component| %>
<% component.with_item(
label: "Really really long label that may wrap, truncate, or appear as a tooltip",
truncate_label: truncate_label
) %>
<% component.with_item(
label: "Really really long label that may wrap, truncate, or appear as a tooltip",
truncate_label: truncate_label
) %>
<% component.with_item(
label: "Really really long label that may wrap, truncate, or appear as a tooltip",
truncate_label: truncate_label
) %>
<% end %>