mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-01 22:31:48 -05:00
92eade7502
[web] BS5 pdf toolbar GitOrigin-RevId: a04091c9e936e52f47c3977b3149ffe613d43bb9
20 lines
503 B
TypeScript
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
|