-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.tsx
More file actions
33 lines (27 loc) · 1.12 KB
/
Card.tsx
File metadata and controls
33 lines (27 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import type React from 'react';
const Card = ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
<div className={`rounded-lg border bg-card text-card-foreground shadow-sm ${className}`} {...props}>
{children}
</div>
);
const CardHeader = ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
<div className={`flex flex-col space-y-1.5 p-6 ${className}`} {...props}>
{children}
</div>
);
const CardTitle = ({ className, children, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (
<h3 className={`text-2xl font-semibold leading-none tracking-tight ${className}`} {...props}>
{children}
</h3>
);
const CardDescription = ({ className, children, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => (
<p className={`text-sm text-muted-foreground ${className}`} {...props}>
{children}
</p>
);
const CardContent = ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
<div className={`p-6 pt-0 ${className}`} {...props}>
{children}
</div>
);
export { Card, CardHeader, CardTitle, CardDescription, CardContent };