mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 23:36:00 -05:00
f57704b844
Add website redesign query string override to arbitrary BS5 pages GitOrigin-RevId: 72816f00d6e2e92dab21035097abc540689af1d3
25 lines
839 B
TypeScript
25 lines
839 B
TypeScript
import { Card, CardBody } from 'react-bootstrap-5'
|
|
import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
|
|
import { FC } from 'react'
|
|
import classNames from 'classnames'
|
|
|
|
// This wraps the Bootstrap 5 Card component but is restricted to the very
|
|
// basic way we're using it, which is as a container for page content. The
|
|
// Bootstrap 3 equivalent in our codebase is a div with class "card"
|
|
const OLPageContentCard: FC<{ className?: string }> = ({
|
|
children,
|
|
className,
|
|
}) => {
|
|
return (
|
|
<BootstrapVersionSwitcher
|
|
bs3={<div className={classNames('card', className)}>{children}</div>}
|
|
bs5={
|
|
<Card className={classNames('page-content-card', className)}>
|
|
<CardBody>{children}</CardBody>
|
|
</Card>
|
|
}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default OLPageContentCard
|