This commit is contained in:
IGNY8 VPS (Salman)
2025-12-04 10:45:43 +00:00
parent a8c572a996
commit 32dae2a7d5
4 changed files with 480 additions and 198 deletions

View File

@@ -1,5 +1,5 @@
interface ComponentCardProps {
title: string | React.ReactNode;
title?: string | React.ReactNode;
children: React.ReactNode;
className?: string; // Additional custom classes for styling
desc?: string | React.ReactNode; // Description text
@@ -15,17 +15,19 @@ const ComponentCard: React.FC<ComponentCardProps> = ({
<div
className={`rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] overflow-visible ${className}`}
>
{/* Card Header */}
<div className="px-6 py-5 relative z-0">
<h3 className="text-base font-medium text-gray-800 dark:text-white/90">
{title}
</h3>
{desc && (
<p className="mt-1 text-sm text-gray-500 dark:text-gray-400">
{desc}
</p>
)}
</div>
{/* Card Header (render only when title or desc provided) */}
{(title || desc) && (
<div className="px-6 py-5 relative z-0">
<h3 className="text-base font-medium text-gray-800 dark:text-white/90">
{title}
</h3>
{desc && (
<p className="mt-1 text-sm text-gray-500 dark:text-gray-400">
{desc}
</p>
)}
</div>
)}
{/* Card Body */}
<div className="p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6 overflow-visible">