overleaf/services/web/frontend/js/features/ui/components/bootstrap-5/badge.tsx
ilkin-overleaf 92eade7502 Merge pull request #20708 from overleaf/ii-bs5-pdf-toolbar
[web] BS5 pdf toolbar

GitOrigin-RevId: a04091c9e936e52f47c3977b3149ffe613d43bb9
2024-10-14 11:06:17 +00:00

20 lines
503 B
TypeScript

import { Badge as BSBadge, BadgeProps as BSBadgeProps } from 'react-bootstrap-5'
import { MergeAndOverride } from '../../../../../../types/utils'
type BadgeProps = MergeAndOverride<
BSBadgeProps,
{
prepend?: React.ReactNode
}
>
function Badge({ prepend, children, ...rest }: BadgeProps) {
return (
<BSBadge {...rest}>
{prepend && <span className="badge-prepend">{prepend}</span>}
<span className="badge-content">{children}</span>
</BSBadge>
)
}
export default Badge