UNPKG

ui-humix-lib

Version:

A simple package for implementinghumix design components in react-based or node.js based projects.

51 lines (42 loc) 1.62 kB
import * as React from "react" import { cn } from "@/lib/utils" const Card = React.forwardRef(({ className, ...props }, ref) => ( <div ref={ref} className={cn("rounded-xl border bg-foreground dark:bg-muted-dark light:text-background dark:text-foreground-dark shadow", className)} {...props} /> )) Card.displayName = "Card" const CardHeader = React.forwardRef(({ className, ...props }, ref) => ( <div ref={ref} className={cn("flex flex-col space-y-1.5 p-6 light:text-background", className)} {...props} /> )) CardHeader.displayName = "CardHeader" const CardTitle = React.forwardRef(({ className, ...props }, ref) => ( <h3 ref={ref} className={cn(" leading-none tracking-tight text-background", className)} {...props} /> )) CardTitle.displayName = "CardTitle" const CardDescription = React.forwardRef(({ className, ...props }, ref) => ( <p ref={ref} className={cn("text-sm text-primary dark:text-foreground-dark", className)} {...props} /> )) CardDescription.displayName = "CardDescription" const CardContent = React.forwardRef(({ className, ...props }, ref) => ( <div ref={ref} className={cn("p-6 pt-0 text-foreground dark:text-foreground-dark", className)} {...props} /> )) CardContent.displayName = "CardContent" const CardFooter = React.forwardRef(({ className, ...props }, ref) => ( <div ref={ref} className={cn("flex items-center p-6 pt-0 text-foreground dark:text-foreground-dark", className)} {...props} /> )) CardFooter.displayName = "CardFooter" export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }