import { PropsWithChildren } from 'react'
import { Card } from 'react-bootstrap'

import BackHeader from './BackHeader'

type CardLayoutProps = {
    text: string,
}

const CardLayout = ({ text, children }: PropsWithChildren<CardLayoutProps>) => (
    <>
        <div className='mx-4 px-3'>
            <BackHeader text={text} />
        </div>
        <Card className='m-4 mt-0'>
            <Card.Body>
                {children}
            </Card.Body>
        </Card>
    </>
)

export default CardLayout
