Skip to content

Commit

Permalink
Rename SegmentedControl--iconOnly-whenNarrow to SegmentedControl-butt…
Browse files Browse the repository at this point in the history
…on--iconOnly-whenNarrow and place on button (#2202)

* Rename whenNarrow so it's a class on the button

* Create silent-crews-pay.md
  • Loading branch information
jonrohan authored Aug 15, 2022
1 parent 2c0fec7 commit b74e78b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-crews-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Rename SegmentedControl--iconOnly-whenNarrow to SegmentedControl-button--iconOnly-whenNarrow and place on button
8 changes: 3 additions & 5 deletions src/segmented-control/segmented-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@

// Icon only when narrow
@media (max-width: $width-md) {
.SegmentedControl--iconOnly-whenNarrow {
.SegmentedControl-button {
width: var(--primer-control-medium-size, 32px);
}
.SegmentedControl-button--iconOnly-whenNarrow {
width: var(--primer-control-medium-size, 32px);

.SegmentedControl-content {
padding: 0;
Expand All @@ -163,7 +161,7 @@

// reset for icon-only buttons
.SegmentedControl-button--iconOnly,
.SegmentedControl--iconOnly-whenNarrow .SegmentedControl-button {
.SegmentedControl-button--iconOnly-whenNarrow {
min-width: unset;
}
}

0 comments on commit b74e78b

Please sign in to comment.