overleaf/services/web/frontend/js/features/ui/components/ol/ol-toast-container.tsx
Mathias Jakobsen cb72799fff [web] Add toast notifications to editor (#21567)
GitOrigin-RevId: 7f7ab83d4615f564c0e79bc2a05ca6cb9e5239fd
2024-11-11 09:05:12 +00:00

31 lines
809 B
TypeScript

import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import { CSSProperties, FC } from 'react'
import { ToastContainer as BS5ToastContainer } from 'react-bootstrap-5'
import { ToastContainer as BS3ToastContainer } from '../bootstrap-3/toast-container'
type OLToastContainerProps = {
style?: CSSProperties
className?: string
}
export const OLToastContainer: FC<OLToastContainerProps> = ({
children,
className,
style,
}) => {
return (
<BootstrapVersionSwitcher
bs5={
<BS5ToastContainer className={className} style={style}>
{children}
</BS5ToastContainer>
}
bs3={
<BS3ToastContainer className={className} style={style}>
{children}
</BS3ToastContainer>
}
/>
)
}