Spaces:
Runtime error
Runtime error
Download Frontend/src/components/ui/Card.jsx from jinksQspider/ExamCraftAI: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/spaces/jinksQspider/ExamCraftAI/resolve/main/Frontend/src/components/ui/Card.jsx
- Command line
-
hf download hf://spaces/jinksQspider/ExamCraftAI/Frontend/src/components/ui/Card.jsx
-
curl -L -o Card.jsx https://huggingface.co/spaces/jinksQspider/ExamCraftAI/resolve/main/Frontend/src/components/ui/Card.jsx
1.9 kB
| import React from "react"; | |
| import { cn } from "../../utils/cn"; | |
| import { motion } from "framer-motion"; | |
| export const Card = React.forwardRef( | |
| ({ className, variant = "default", hoverEffect = false, children, ...props }, ref) => { | |
| const variants = { | |
| default: "bg-card text-card-foreground border-border border", | |
| glass: "glass text-foreground", | |
| glow: "bg-card text-card-foreground border-border border hover:shadow-[0_0_15px_rgba(var(--primary),0.2)] transition-shadow duration-300", | |
| }; | |
| const Wrapper = hoverEffect ? motion.div : "div"; | |
| const wrapperProps = hoverEffect ? { whileHover: { y: -4 } } : {}; | |
| return ( | |
| <Wrapper | |
| ref={ref} | |
| {...wrapperProps} | |
| className={cn( | |
| "rounded-xl overflow-hidden", | |
| variants[variant], | |
| className | |
| )} | |
| {...props} | |
| > | |
| {children} | |
| </Wrapper> | |
| ); | |
| } | |
| ); | |
| Card.displayName = "Card"; | |
| export function CardHeader({ className, ...props }) { | |
| return <div className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />; | |
| } | |
| export function CardTitle({ className, ...props }) { | |
| return ( | |
| <h3 | |
| className={cn("text-2xl font-semibold leading-none tracking-tight", className)} | |
| {...props} | |
| /> | |
| ); | |
| } | |
| export function CardDescription({ className, ...props }) { | |
| return ( | |
| <p className={cn("text-sm text-muted-foreground", className)} {...props} /> | |
| ); | |
| } | |
| export function CardContent({ className, ...props }) { | |
| return <div className={cn("p-6 pt-0", className)} {...props} />; | |
| } | |
| export function CardFooter({ className, ...props }) { | |
| return ( | |
| <div className={cn("flex items-center p-6 pt-0", className)} {...props} /> | |
| ); | |
| } | |