Spaces:
Configuration error
Configuration error
Create card.jsx
Browse files- component/card.jsx +11 -0
component/card.jsx
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default function Card({ title, subtitle, icon = "💡", onClick }) {
|
| 2 |
+
return (
|
| 3 |
+
<button onClick={onClick} className="card w-full text-left border border-slate-100 hover:shadow-md transition p-4 flex items-start gap-3">
|
| 4 |
+
<div className="text-2xl">{icon}</div>
|
| 5 |
+
<div>
|
| 6 |
+
<div className="font-medium">{title}</div>
|
| 7 |
+
<div className="text-sm text-slate-500 mt-1">{subtitle}</div>
|
| 8 |
+
</div>
|
| 9 |
+
</button>
|
| 10 |
+
);
|
| 11 |
+
}
|