import classnames from 'classnames' import { MergeAndOverride } from '../../../../types/utils' import BadgeWrapper from '@/features/ui/components/bootstrap-5/wrappers/badge-wrapper' type BadgeProps = MergeAndOverride< React.ComponentProps<'span'>, { prepend?: React.ReactNode children: React.ReactNode closeBtnProps?: React.ComponentProps<'button'> className?: string bsStyle?: NonNullable< React.ComponentProps['bs3Props'] >['bsStyle'] } > function Badge({ prepend, children, closeBtnProps, bsStyle, className, ...rest }: BadgeProps) { const classNames = bsStyle === null ? className : classnames('label', `label-${bsStyle}`, className) return ( {prepend && {prepend}} {children} {closeBtnProps && ( )} ) } export default Badge