Upload frontend/components/ui/card.tsx
Browse files
frontend/components/ui/card.tsx
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import * as React from "react";
|
| 2 |
+
import { cn } from "@/lib/utils";
|
| 3 |
+
|
| 4 |
+
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
| 5 |
+
({ className, ...props }, ref) => (
|
| 6 |
+
<div ref={ref} className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)} {...props} />
|
| 7 |
+
)
|
| 8 |
+
);
|
| 9 |
+
Card.displayName = "Card";
|
| 10 |
+
|
| 11 |
+
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
| 12 |
+
({ className, ...props }, ref) => (
|
| 13 |
+
<div ref={ref} className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />
|
| 14 |
+
)
|
| 15 |
+
);
|
| 16 |
+
CardHeader.displayName = "CardHeader";
|
| 17 |
+
|
| 18 |
+
const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
|
| 19 |
+
({ className, ...props }, ref) => (
|
| 20 |
+
<h3 ref={ref} className={cn("text-2xl font-semibold leading-none tracking-tight", className)} {...props} />
|
| 21 |
+
)
|
| 22 |
+
);
|
| 23 |
+
CardTitle.displayName = "CardTitle";
|
| 24 |
+
|
| 25 |
+
const CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
|
| 26 |
+
({ className, ...props }, ref) => (
|
| 27 |
+
<p ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
|
| 28 |
+
)
|
| 29 |
+
);
|
| 30 |
+
CardDescription.displayName = "CardDescription";
|
| 31 |
+
|
| 32 |
+
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
| 33 |
+
({ className, ...props }, ref) => (
|
| 34 |
+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
| 35 |
+
)
|
| 36 |
+
);
|
| 37 |
+
CardContent.displayName = "CardContent";
|
| 38 |
+
|
| 39 |
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent };
|