|
13 | 13 | import {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';
|
14 | 14 | import {centerBaseline} from './CenterBaseline';
|
15 | 15 | import {centerPadding, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
16 |
| -import {ContextValue, Provider, SlotProps} from 'react-aria-components'; |
| 16 | +import {ContextValue, Provider, TextContext as RACTextContext, SlotProps} from 'react-aria-components'; |
17 | 17 | import {filterDOMProps} from '@react-aria/utils';
|
18 | 18 | import {fontRelative, lightDark, style} from '../style' with {type: 'macro'};
|
19 | 19 | import {IconContext} from './Icon';
|
@@ -210,14 +210,15 @@ export const Badge = forwardRef(function Badge(props: BadgeProps, ref: DOMRef<HT
|
210 | 210 | values={[
|
211 | 211 | [TextContext, {
|
212 | 212 | styles: style({
|
213 |
| - paddingY: '--labelPadding', |
214 |
| - order: 1, |
215 |
| - overflowX: 'hidden', |
216 |
| - overflowY: 'hidden', |
217 |
| - textOverflow: 'ellipsis', |
| 213 | + paddingY: '--labelPadding', |
| 214 | + order: 1, |
| 215 | + overflowX: 'hidden', |
| 216 | + overflowY: 'hidden', |
| 217 | + textOverflow: 'ellipsis', |
218 | 218 | whiteSpace: {overflowMode: {truncate: 'nowrap', wrap: 'normal'}}
|
219 | 219 | })({overflowMode})
|
220 | 220 | }],
|
| 221 | + [RACTextContext, {}], |
221 | 222 | [IconContext, {
|
222 | 223 | render: centerBaseline({slot: 'icon', styles: style({order: 0})}),
|
223 | 224 | styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})
|
|
0 commit comments