Skip to content

Commit f0647d2

Browse files
committed
fix: segmented buttons
1 parent 1de5ffa commit f0647d2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

polaris-react/src/components/Button/Button.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,13 +982,15 @@
982982
}
983983

984984
> :first-child .Button,
985+
> :first-child .Button::before,
985986
> :first-child .Button::after {
986987
border-radius: 0;
987988
border-top-left-radius: var(--p-border-radius-2);
988989
border-bottom-left-radius: var(--p-border-radius-2);
989990
}
990991

991992
> :last-child .Button,
993+
> :last-child .Button::before,
992994
> :last-child .Button::after {
993995
border-radius: 0;
994996
border-top-right-radius: var(--p-border-radius-2);
@@ -1003,11 +1005,13 @@
10031005

10041006
[data-buttongroup-connected-top='true'] {
10051007
> :first-child .Button,
1008+
> :first-child .Button::before,
10061009
> :first-child .Button::after {
10071010
border-top-left-radius: 0;
10081011
}
10091012

10101013
> :last-child .Button,
1014+
> :last-child .Button::before,
10111015
> :last-child .Button::after {
10121016
border-top-right-radius: 0;
10131017
}

polaris-react/src/components/Button/Button.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,13 +635,16 @@ export function Split() {
635635
return (
636636
<div style={{height: '100px'}}>
637637
<ButtonGroup segmented>
638-
<Button>Save</Button>
638+
<Button variant="primary">Save</Button>
639+
640+
<div style={{width: '0px'}} />
639641

640642
<Popover
641643
active={active}
642644
preferredAlignment="right"
643645
activator={
644646
<Button
647+
variant="primary"
645648
onClick={() => setActive(true)}
646649
icon={ChevronDownMinor}
647650
accessibilityLabel="Other save actions"

polaris.shopify.com/pages/examples/button-split.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ function ButtonExample() {
88
return (
99
<div style={{height: '100px'}}>
1010
<ButtonGroup segmented>
11-
<Button>Save</Button>
12-
11+
<Button variant="primary">Save</Button>
12+
<div style={{width: '0px'}} />
1313
<Popover
1414
active={active}
1515
preferredAlignment="right"
1616
activator={
1717
<Button
18+
variant="primary"
1819
onClick={() => setActive(true)}
1920
icon={ChevronDownMinor}
2021
accessibilityLabel="Other save actions"

0 commit comments

Comments
 (0)