2024-10-08 10:22:13 -04:00
|
|
|
import { Badge as BSBadge, BadgeProps as BSBadgeProps } from 'react-bootstrap-5'
|
2024-04-19 08:30:23 -04:00
|
|
|
import { MergeAndOverride } from '../../../../../../types/utils'
|
|
|
|
|
|
|
|
type BadgeProps = MergeAndOverride<
|
2024-10-08 10:22:13 -04:00
|
|
|
BSBadgeProps,
|
2024-04-19 08:30:23 -04:00
|
|
|
{
|
|
|
|
prepend?: React.ReactNode
|
|
|
|
}
|
|
|
|
>
|
|
|
|
|
2024-10-08 10:22:13 -04:00
|
|
|
function Badge({ prepend, children, ...rest }: BadgeProps) {
|
2024-04-19 08:30:23 -04:00
|
|
|
return (
|
|
|
|
<BSBadge {...rest}>
|
|
|
|
{prepend && <span className="badge-prepend">{prepend}</span>}
|
2024-05-27 08:46:48 -04:00
|
|
|
<span className="badge-content">{children}</span>
|
2024-04-19 08:30:23 -04:00
|
|
|
</BSBadge>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Badge
|