Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add min-width to small size Button #2821

Merged
merged 8 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brown-rocks-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Add min-width
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/components/primer/beta/button.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ summary.Button {
height: var(--control-small-size);
padding: 0 var(--control-small-paddingInline-condensed);
gap: var(--control-small-gap);
min-width: var(--control-small-size);

& .Button-label {
line-height: var(--text-body-lineHeight-small);
Expand Down
6 changes: 6 additions & 0 deletions previews/primer/beta/button_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ def inactive(
def link_scheme_label_wrap
render_with_template(locals: {})
end

# @label Small scheme with one character
# @snapshot
def small_scheme_one_character
render_with_template(locals: {})
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<%= render(Primer::Beta::Button.new(
size: :small,
)) do %>
i
<% end %>
Loading