-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow Breadcrumb items to wrap (#2869)
Co-authored-by: smockle <smockle@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/view-components': patch | ||
--- | ||
|
||
fix: Allow breadcrumb items to wrap. |
Binary file added
BIN
+40.6 KB
...pshots.test.ts-snapshots/primer/beta/breadcrumbs/with_beta_truncate/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.7 KB
...pshots.test.ts-snapshots/primer/beta/breadcrumbs/with_beta_truncate/focused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.3 KB
....test.ts-snapshots/primer/beta/breadcrumbs/with_deprecated_truncate/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.4 KB
....test.ts-snapshots/primer/beta/breadcrumbs/with_deprecated_truncate/focused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
previews/primer/beta/breadcrumbs_preview/with_beta_truncate.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<% texts = [ | ||
"Breadcrumb Item 1", | ||
"Breadcrumb Item 2 with a really long, long, long name", | ||
"Breadcrumb Item 3 with an extremely long, long, long name" | ||
] %> | ||
<%= render(Primer::Beta::Breadcrumbs.new) do |breadcrumbs| %> | ||
<% texts.each_with_index do |text, i| %> | ||
<% breadcrumbs.with_item(href: "##{i}") do %> | ||
<%= render(Primer::Beta::Truncate.new) do |truncate| %> | ||
<% truncate.with_item(max_width: 135) { text } %> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<% end %> |
14 changes: 14 additions & 0 deletions
14
previews/primer/beta/breadcrumbs_preview/with_deprecated_truncate.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<%# erblint:counter DeprecatedComponentsCounter 1 %> | ||
<% texts = [ | ||
"Breadcrumb Item 1", | ||
"Breadcrumb Item 2 with a really long, long, long name", | ||
"Breadcrumb Item 3 with an extremely long, long, long name" | ||
] %> | ||
<%= render(Primer::Beta::Breadcrumbs.new) do |breadcrumbs| %> | ||
<% texts.each_with_index do |text, i| %> | ||
<% breadcrumbs.with_item(href: "##{i}") do %> | ||
<%= render(Primer::Truncate.new(inline: true, max_width: 135)) { text } %> | ||
<% end %> | ||
<% end %> | ||
<% end %> |