ConceptPortal-public/rsconcept/frontend/src/components/Common/Card.tsx

16 lines
374 B
TypeScript
Raw Normal View History

2023-07-15 17:46:19 +03:00
interface CardProps {
title?: string
widthClass?: string
children: React.ReactNode
}
2023-07-18 14:55:40 +03:00
function Card({title, widthClass='min-w-fit', children}: CardProps) {
2023-07-15 17:46:19 +03:00
return (
2023-07-22 12:24:14 +03:00
<div className={`border shadow-md py-2 clr-card px-6 ${widthClass}`}>
2023-07-15 17:46:19 +03:00
{ title && <h1 className='mb-2 text-xl font-bold'>{title}</h1> }
{children}
</div>
);
}
export default Card;