2024-11-04 11:10:49 -05:00
|
|
|
import { Card, CardBody } from 'react-bootstrap-5'
|
2024-04-19 06:46:32 -04:00
|
|
|
import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
|
|
|
|
import { FC } from 'react'
|
2024-11-04 11:10:49 -05:00
|
|
|
import classNames from 'classnames'
|
2024-04-19 06:46:32 -04:00
|
|
|
|
|
|
|
// 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"
|
2024-11-04 11:10:49 -05:00
|
|
|
const OLPageContentCard: FC<{ className?: string }> = ({
|
|
|
|
children,
|
|
|
|
className,
|
|
|
|
}) => {
|
2024-04-19 06:46:32 -04:00
|
|
|
return (
|
|
|
|
<BootstrapVersionSwitcher
|
2024-11-04 11:10:49 -05:00
|
|
|
bs3={<div className={classNames('card', className)}>{children}</div>}
|
2024-04-19 06:46:32 -04:00
|
|
|
bs5={
|
2024-11-04 11:10:49 -05:00
|
|
|
<Card className={classNames('page-content-card', className)}>
|
2024-04-19 06:46:32 -04:00
|
|
|
<CardBody>{children}</CardBody>
|
|
|
|
</Card>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-11-04 11:10:49 -05:00
|
|
|
export default OLPageContentCard
|