mirror of
https://github.com/Since-3/since3-portal.git
synced 2026-10-12 19:51:17 +00:00
66 lines
1.4 KiB
TypeScript
66 lines
1.4 KiB
TypeScript
import { cn } from "cn"
|
|
|
|
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
data-slot="card"
|
|
className={cn(
|
|
"rounded-lg border border-border bg-card p-6 text-card-foreground",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
data-slot="card-header"
|
|
className={cn("flex flex-col gap-1.5", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function CardTitle({ className, ...props }: React.ComponentProps<"h3">) {
|
|
return (
|
|
<h3
|
|
data-slot="card-title"
|
|
className={cn("text-title leading-tight font-semibold", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function CardDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
return (
|
|
<p
|
|
data-slot="card-description"
|
|
className={cn("text-body text-muted-foreground", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
data-slot="card-content"
|
|
className={cn("pt-4", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
data-slot="card-footer"
|
|
className={cn("flex items-center gap-2 pt-4", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }
|