mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 18:54:23 -05:00
fe7de51827
[web] Split badges and tags GitOrigin-RevId: fce5a93672f431ff74c2b63a67e249f5f7e7fecd
20 lines
514 B
TypeScript
20 lines
514 B
TypeScript
import { Badge as BSBadge } from 'react-bootstrap-5'
|
|
import { MergeAndOverride } from '../../../../../../types/utils'
|
|
|
|
type BadgeProps = MergeAndOverride<
|
|
React.ComponentProps<typeof BSBadge>,
|
|
{
|
|
prepend?: React.ReactNode
|
|
}
|
|
>
|
|
|
|
function Badge({ prepend, children, closeBtnProps, ...rest }: BadgeProps) {
|
|
return (
|
|
<BSBadge {...rest}>
|
|
{prepend && <span className="badge-prepend">{prepend}</span>}
|
|
<span className="badge-content">{children}</span>
|
|
</BSBadge>
|
|
)
|
|
}
|
|
|
|
export default Badge
|