Skip to content

Commit 999f9fa

Browse files
committed
update Badge
1 parent 96e7f71 commit 999f9fa

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/mui-joy/src/Badge/Badge.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ const Badge = React.forwardRef(function Badge(inProps, ref) {
146146
},
147147
badgeInset: badgeInsetProp = 0,
148148
children,
149-
component = 'span',
150149
size: sizeProp = 'md',
151150
color: colorProp = 'primary',
152151
invisible: invisibleProp = false,
@@ -190,20 +189,19 @@ const Badge = React.forwardRef(function Badge(inProps, ref) {
190189
if (invisible && badgeContentProp === 0) {
191190
displayValue = '';
192191
}
193-
const externalForwardedProps = { ...other, component };
194192

195193
const [SlotRoot, rootProps] = useSlot('root', {
196194
ref,
197195
className: classes.root,
198196
elementType: BadgeRoot,
199-
externalForwardedProps,
197+
externalForwardedProps: other,
200198
ownerState,
201199
});
202200

203201
const [SlotBadge, badgeProps] = useSlot('badge', {
204202
className: classes.badge,
205203
elementType: BadgeBadge,
206-
externalForwardedProps,
204+
externalForwardedProps: other,
207205
ownerState,
208206
});
209207

@@ -252,11 +250,6 @@ Badge.propTypes /* remove-proptypes */ = {
252250
PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
253251
PropTypes.string,
254252
]),
255-
/**
256-
* The component used for the root node.
257-
* Either a string to use a HTML element or a component.
258-
*/
259-
component: PropTypes.elementType,
260253
/**
261254
* If `true`, the badge is invisible.
262255
* @default false

0 commit comments

Comments
 (0)