UNPKG

@medalsocial/meda

Version:

Shared Meda UI shell and runtime package.

21 lines (20 loc) 1.15 kB
'use client'; import { jsx as _jsx } from "react/jsx-runtime"; import { cn } from '../lib/utils.js'; function CardRoot({ children, className, ...props }) { return (_jsx("div", { "data-slot": "card", className: cn('flex flex-col rounded-xl border border-border bg-card text-card-foreground', className), ...props, children: children })); } function CardHeader({ children, className, ...props }) { return (_jsx("div", { "data-slot": "card-header", className: cn('flex flex-col gap-1 border-b border-border px-4 py-3 last:border-b-0', className), ...props, children: children })); } function CardBody({ children, className, ...props }) { return (_jsx("div", { "data-slot": "card-body", className: cn('px-4 py-3', className), ...props, children: children })); } function CardFooter({ children, className, ...props }) { return (_jsx("div", { "data-slot": "card-footer", className: cn('flex items-center justify-end gap-2 border-t border-border px-4 py-3 first:border-t-0', className), ...props, children: children })); } export const Card = Object.assign(CardRoot, { Header: CardHeader, Body: CardBody, Footer: CardFooter, });