mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 20:09:55 -05:00
862fb9f2ae
[web] Standardize `.badge` styling and HTML structure for both gallery-search and blog post page GitOrigin-RevId: edfaceb61900897178654a920995e5c857fe7107
20 lines
510 B
TypeScript
20 lines
510 B
TypeScript
import { Badge as BSBadge, BadgeProps as BSBadgeProps } from 'react-bootstrap-5'
|
|
import { MergeAndOverride } from '../../../../../../types/utils'
|
|
|
|
export 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
|