Skip to content

Commit 121e737

Browse files
committed
Remove sxProp support from LabelGroup
1 parent e68d80e commit 121e737

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/react/src/LabelGroup/LabelGroup.tsx

+3-9
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import VisuallyHidden from '../_VisuallyHidden'
77
import {AnchoredOverlay} from '../AnchoredOverlay'
88
import {Button, IconButton} from '../Button'
99
import {useTheme} from '../ThemeProvider'
10-
import type {DeprecatedSxProp} from '../sx'
11-
import sx from '../sx'
1210
import classes from './LabelGroup.module.css'
1311

1412
export type LabelGroupProps = {
@@ -18,9 +16,9 @@ export type LabelGroupProps = {
1816
overflowStyle?: 'inline' | 'overlay'
1917
/** How many tokens to show. `'auto'` truncates the tokens to fit in the parent container. Passing a number will truncate after that number tokens. If this is undefined, tokens will never be truncated. */
2018
visibleChildCount?: 'auto' | number
21-
} & DeprecatedSxProp
19+
}
2220

23-
const StyledLabelGroupContainer = styled.div<DeprecatedSxProp>`
21+
const StyledLabelGroupContainer = styled.div`
2422
display: flex;
2523
flex-wrap: nowrap;
2624
gap: var(--base-size-4);
@@ -38,8 +36,6 @@ const StyledLabelGroupContainer = styled.div<DeprecatedSxProp>`
3836
margin-block-end: 0;
3937
list-style-type: none;
4038
}
41-
42-
${sx};
4339
`
4440

4541
const ItemWrapper = styled.div`
@@ -154,7 +150,6 @@ const LabelGroup: React.FC<React.PropsWithChildren<LabelGroupProps>> = ({
154150
children,
155151
visibleChildCount,
156152
overflowStyle = 'overlay',
157-
sx: sxProp,
158153
as = 'ul',
159154
}) => {
160155
const containerRef = React.useRef<HTMLElement>(null)
@@ -334,7 +329,6 @@ const LabelGroup: React.FC<React.PropsWithChildren<LabelGroupProps>> = ({
334329
ref={containerRef}
335330
data-overflow={overflowStyle === 'inline' && isOverflowShown ? 'inline' : undefined}
336331
data-list={isList || undefined}
337-
sx={sxProp}
338332
as={as}
339333
>
340334
{React.Children.map(children, (child, index) => (
@@ -376,7 +370,7 @@ const LabelGroup: React.FC<React.PropsWithChildren<LabelGroupProps>> = ({
376370
</ToggleWrapper>
377371
</StyledLabelGroupContainer>
378372
) : (
379-
<StyledLabelGroupContainer data-overflow="inline" data-list={isList || undefined} sx={sxProp} as={as}>
373+
<StyledLabelGroupContainer data-overflow="inline" data-list={isList || undefined} as={as}>
380374
{isList
381375
? React.Children.map(children, (child, index) => {
382376
return <li key={index}>{child}</li>

0 commit comments

Comments
 (0)