Skip to content

Commit

Permalink
Add min-width to small size Button (#2821)
Browse files Browse the repository at this point in the history
Co-authored-by: khiga8 <khiga8@users.noreply.github.com>
Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 30, 2024
1 parent 1863522 commit 19f4d7e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
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 %>

0 comments on commit 19f4d7e

Please sign in to comment.