mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-05 17:46:37 +08:00
91 lines
2.1 KiB
TypeScript
91 lines
2.1 KiB
TypeScript
import * as React from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
function Card({ className, style, ...props }: React.ComponentProps<"div">) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"relative flex flex-col transition-all duration-300",
|
|
"rounded-[24px] text-card-foreground shadow-[0_12px_40px_rgba(0,0,0,0.12)] dark:shadow-[0_12px_40px_rgba(0,0,0,0.4)]",
|
|
className,
|
|
)}
|
|
data-slot="card"
|
|
style={{
|
|
...style,
|
|
background:
|
|
"linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 40%, rgba(255,255,255,0.05) 60%, rgba(255,255,255,0.2) 100%)",
|
|
boxShadow:
|
|
"inset 0 1px 1px rgba(255,255,255,0.8), inset 0 0 0 1px rgba(255,255,255,0.3), inset 0 -1px 1px rgba(0,0,0,0.1), 0 12px 40px rgba(0,0,0,0.12)",
|
|
backdropFilter: "blur(24px) saturate(180%)",
|
|
WebkitBackdropFilter: "blur(24px) saturate(180%)",
|
|
}}
|
|
{...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", 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,
|
|
};
|