ConceptPortal-public/rsconcept/frontend/src/components/Common/Card.tsx
2023-07-25 20:27:29 +03:00

17 lines
397 B
TypeScript

interface CardProps {
title?: string
widthClass?: string
children: React.ReactNode
}
function Card({ title, widthClass = 'min-w-fit', children }: CardProps) {
return (
<div className={`border shadow-md py-2 clr-card px-6 ${widthClass}`}>
{ title && <h1 className='mb-2 text-xl font-bold whitespace-nowrap'>{title}</h1> }
{children}
</div>
);
}
export default Card;