17 lines
385 B
TypeScript
17 lines
385 B
TypeScript
|
|
import React from 'react';
|
||
|
|
|
||
|
|
interface CardProps {
|
||
|
|
children: React.ReactNode;
|
||
|
|
className?: string;
|
||
|
|
title?: string | React.ReactNode;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function Card({ children, className = '', title }: CardProps) {
|
||
|
|
return (
|
||
|
|
<div className={`card ${className}`}>
|
||
|
|
{title && <h2 className="text-xl font-bold mb-4 text-primary-400">{title}</h2>}
|
||
|
|
{children}
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|