Pontonkid commited on
Commit
0d2cc75
·
verified ·
1 Parent(s): c68b719

Create card.tsx

Browse files
Files changed (1) hide show
  1. card.tsx +26 -0
card.tsx ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+
3
+ interface CardProps {
4
+ title: string;
5
+ icon?: React.ReactNode;
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ }
9
+
10
+ const Card: React.FC<CardProps> = ({ title, icon, children, className }) => {
11
+ return (
12
+ <div className={`bg-white border border-gray-200 rounded-lg shadow-sm w-full ${className}`}>
13
+ <div className="flex items-center justify-between p-4 border-b border-gray-200">
14
+ <div className="flex items-center gap-3">
15
+ {icon}
16
+ <h2 className="text-lg font-semibold text-gray-700">{title}</h2>
17
+ </div>
18
+ </div>
19
+ <div className="p-6">
20
+ {children}
21
+ </div>
22
+ </div>
23
+ );
24
+ };
25
+
26
+ export default Card;