mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-30 08:00:08 +02:00

Apply minor upgrades to Bootstrap 5 and react-bootstrap GitOrigin-RevId: eb013f38515ebd4b9572d139f00841aca344e3c6
20 lines
541 B
TypeScript
20 lines
541 B
TypeScript
import { forwardRef } from 'react'
|
|
import { Popover, PopoverProps } from 'react-bootstrap'
|
|
|
|
type OLPopoverProps = Omit<PopoverProps, 'title'> & {
|
|
title?: React.ReactNode
|
|
}
|
|
|
|
const OLPopover = forwardRef<HTMLDivElement, OLPopoverProps>((props, ref) => {
|
|
const { title, children, ...bs5Props } = props
|
|
|
|
return (
|
|
<Popover {...bs5Props} ref={ref}>
|
|
{title && <Popover.Header>{title}</Popover.Header>}
|
|
<Popover.Body>{children}</Popover.Body>
|
|
</Popover>
|
|
)
|
|
})
|
|
OLPopover.displayName = 'OLPopover'
|
|
|
|
export default OLPopover
|