Spaces:
Sleeping
Sleeping
'use client'; | |
import { cn } from '@/utils/Helpers'; | |
import * as React from 'react'; | |
const Card = ({ ref, className, ...props }: React.HTMLAttributes<HTMLDivElement> & { ref?: React.RefObject<HTMLDivElement> }) => ( | |
<div ref={ref} className={cn('rounded-lg border bg-card text-card-foreground shadow-sm', className)} {...props} /> | |
); | |
Card.displayName = 'Card'; | |
const CardHeader = ({ ref, className, ...props }: React.HTMLAttributes<HTMLDivElement> & { ref: React.RefObject<HTMLDivElement> }) => ( | |
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} /> | |
); | |
CardHeader.displayName = 'CardHeader'; | |
const CardTitle = ({ ref, className, ...props }: React.HTMLAttributes<HTMLHeadingElement> & { ref: React.RefObject<HTMLParagraphElement> }) => ( | |
// eslint-disable-next-line jsx-a11y/heading-has-content | |
<h3 ref={ref} className={cn('text-2xl font-semibold leading-none tracking-tight', className)} {...props} /> | |
); | |
CardTitle.displayName = 'CardTitle'; | |
const CardDescription = ({ ref, className, ...props }: React.HTMLAttributes<HTMLParagraphElement> & { ref: React.RefObject<HTMLParagraphElement> }) => ( | |
<p ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} /> | |
); | |
CardDescription.displayName = 'CardDescription'; | |
const CardContent = ({ ref, className, ...props }: React.HTMLAttributes<HTMLDivElement> & { ref?: React.RefObject<HTMLDivElement> }) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />; | |
CardContent.displayName = 'CardContent'; | |
const CardFooter = ({ ref, className, ...props }: React.HTMLAttributes<HTMLDivElement> & { ref: React.RefObject<HTMLDivElement> }) => ( | |
<div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} /> | |
); | |
CardFooter.displayName = 'CardFooter'; | |
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }; | |