mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-02 17:06:36 +08:00
85 lines
1.6 KiB
TypeScript
85 lines
1.6 KiB
TypeScript
import * as React from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"rounded-xl border border-default-200 bg-white text-card-foreground shadow-sm dark:bg-default-50/20",
|
|
className,
|
|
)}
|
|
data-slot="card"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
className={cn("flex flex-col gap-1.5 p-6", className)}
|
|
data-slot="card-header"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function CardTitle({
|
|
className,
|
|
children,
|
|
...props
|
|
}: React.ComponentProps<"h3">) {
|
|
return (
|
|
<h3
|
|
className={cn(
|
|
"text-lg font-semibold leading-none tracking-tight",
|
|
className,
|
|
)}
|
|
data-slot="card-title"
|
|
{...props}
|
|
>
|
|
{children}
|
|
</h3>
|
|
);
|
|
}
|
|
|
|
function CardDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
return (
|
|
<p
|
|
className={cn("text-sm text-default-500", className)}
|
|
data-slot="card-description"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
className={cn("p-6 pt-0", className)}
|
|
data-slot="card-content"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
className={cn("flex items-center p-6 pt-0", className)}
|
|
data-slot="card-footer"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardFooter,
|
|
CardHeader,
|
|
CardTitle,
|
|
};
|