/*! Strand UI | MIT License | dillingerstaffing.com */ import type { JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface CardProps extends JSX.HTMLAttributes { /** Surface style; `interactive` is kept for compatibility, prefer the boolean. */ variant?: "elevated" | "outlined" | "flat" | "warm" | "interactive"; /** Inner padding. */ padding?: "none" | "sm" | "md" | "lg" | "xl"; /** Hover and pointer affordance, orthogonal to the surface. */ interactive?: boolean; /** Pressed or selected state. */ active?: boolean; /** Element to render, e.g. "article". */ as?: keyof JSX.IntrinsicElements; } /** * Contained surface for grouping related content. * * @example *

Title

*/ export const Card = forwardRef( ({ variant = "elevated", padding = "md", interactive = false, active = false, as = "div", className = "", children, ...rest }, ref) => { // biome-ignore lint/suspicious/noExplicitAny: polymorphic tag const Tag = as as any; return ( {children} ); }, ); Card.displayName = "Card";