Skip to content

Commit

Permalink
feat(SegmentedControl)!: fix marcs comment
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryMatte committed Sep 23, 2024
1 parent d078759 commit 0048648
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ exports[`SegmentedControl Matches snapshot (desktop) 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: var(--font-family);
font-size: 0.875rem;
font-weight: var(--font-normal);
gap: var(--spacing-1x);
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-letter-spacing: 0.05rem;
-moz-letter-spacing: 0.05rem;
-ms-letter-spacing: 0.05rem;
letter-spacing: 0.05rem;
line-height: 1.25rem;
min-height: var(--size-2x);
padding: 0 var(--spacing-1halfx);
Expand All @@ -50,14 +47,15 @@ exports[`SegmentedControl Matches snapshot (desktop) 1`] = `
.c1:hover::before {
background-color: rgb(0 0 0 / 0.05);
border-radius: var(--border-radius-1halfx);
border-radius: var(--border-radius);
content: " ";
display: block;
left: 6px;
height: calc(100% - 0.375rem);
left: 0.1875rem;
min-height: 1.5rem;
position: absolute;
top: 0.1875rem;
width: calc(100% - var(--spacing-1halfx));
width: calc(100% - 0.375rem);
}
.c1:focus {
Expand Down Expand Up @@ -108,17 +106,14 @@ exports[`SegmentedControl Matches snapshot (desktop) 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: var(--font-family);
font-size: 0.875rem;
font-weight: var(--font-semi-bold);
gap: var(--spacing-1x);
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-letter-spacing: 0.05rem;
-moz-letter-spacing: 0.05rem;
-ms-letter-spacing: 0.05rem;
letter-spacing: 0.05rem;
line-height: 1.25rem;
min-height: var(--size-2x);
padding: 0 var(--spacing-1halfx);
Expand All @@ -132,14 +127,15 @@ exports[`SegmentedControl Matches snapshot (desktop) 1`] = `
.c2:hover::before {
background-color: rgb(0 0 0 / 0.05);
border-radius: var(--border-radius-1halfx);
border-radius: var(--border-radius);
content: none;
display: block;
left: 6px;
height: calc(100% - 0.375rem);
left: 0.1875rem;
min-height: 1.5rem;
position: absolute;
top: 0.1875rem;
width: calc(100% - var(--spacing-1halfx));
width: calc(100% - 0.375rem);
}
.c2:focus {
Expand Down Expand Up @@ -264,17 +260,14 @@ exports[`SegmentedControl Matches snapshot (mobile) 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: var(--font-family);
font-size: 1rem;
font-weight: var(--font-normal);
gap: var(--spacing-1x);
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-letter-spacing: 0.05rem;
-moz-letter-spacing: 0.05rem;
-ms-letter-spacing: 0.05rem;
letter-spacing: 0.05rem;
line-height: 1.25rem;
min-height: var(--size-3x);
padding: 0 var(--spacing-1halfx);
Expand All @@ -288,14 +281,15 @@ exports[`SegmentedControl Matches snapshot (mobile) 1`] = `
.c1:hover::before {
background-color: rgb(0 0 0 / 0.05);
border-radius: var(--border-radius-1halfx);
border-radius: var(--border-radius);
content: " ";
display: block;
left: 6px;
height: calc(100% - 0.375rem);
left: 0.1875rem;
min-height: 1.5rem;
position: absolute;
top: 0.1875rem;
width: calc(100% - var(--spacing-1halfx));
width: calc(100% - 0.375rem);
}
.c1:focus {
Expand Down Expand Up @@ -346,17 +340,14 @@ exports[`SegmentedControl Matches snapshot (mobile) 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: var(--font-family);
font-size: 1rem;
font-weight: var(--font-semi-bold);
gap: var(--spacing-1x);
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-letter-spacing: 0.05rem;
-moz-letter-spacing: 0.05rem;
-ms-letter-spacing: 0.05rem;
letter-spacing: 0.05rem;
line-height: 1.25rem;
min-height: var(--size-3x);
padding: 0 var(--spacing-1halfx);
Expand All @@ -370,14 +361,15 @@ exports[`SegmentedControl Matches snapshot (mobile) 1`] = `
.c2:hover::before {
background-color: rgb(0 0 0 / 0.05);
border-radius: var(--border-radius-1halfx);
border-radius: var(--border-radius);
content: none;
display: block;
left: 6px;
height: calc(100% - 0.375rem);
left: 0.1875rem;
min-height: 1.5rem;
position: absolute;
top: 0.1875rem;
width: calc(100% - var(--spacing-1halfx));
width: calc(100% - 0.375rem);
}
.c2:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const ToggleButton = styled.button<ToggleButtonProps>`
border-radius: var(--border-radius);
color: ${({ theme, pressed }) => (pressed ? theme.component['segmented-control-pressed-text-color'] : theme.component['segmented-control-text-color'])};
display: flex;
font-family: var(--font-family);
font-size: ${({ isMobile }) => (isMobile ? '1rem' : '0.875rem')};
font-weight: ${({ pressed }) => (pressed ? 'var(--font-semi-bold)' : 'var(--font-normal)')};
gap: var(--spacing-1x);
justify-content: center;
letter-spacing: 0.05rem;
line-height: 1.25rem;
min-height: ${({ isMobile }) => (isMobile ? 'var(--size-3x)' : 'var(--size-2x)')};
padding: 0 var(--spacing-1halfx);
Expand All @@ -39,14 +39,15 @@ const ToggleButton = styled.button<ToggleButtonProps>`
&::before {
background-color: ${({ theme }) => (theme.component['segmented-control-hover-background-color'])};
border-radius: var(--border-radius-1halfx);
border-radius: var(--border-radius);
content: ${({ pressed }) => (pressed ? 'none' : '" "')};
display: block;
left: 6px;
height: calc(100% - 0.375rem);
left: 0.1875rem;
min-height: 1.5rem;
position: absolute;
top: 0.1875rem;
width: calc(100% - var(--spacing-1halfx));
width: calc(100% - 0.375rem);
}
}
Expand Down

0 comments on commit 0048648

Please sign in to comment.