UNPKG

@konstructio/ui

Version:

A set of reusable and customizable React components built for konstruct.io

43 lines (42 loc) 1.01 kB
import { jsx as o } from "react/jsx-runtime"; import { forwardRef as f } from "react"; import { cn as t } from "../../utils/index.js"; import { cardVariants as n, cardBaseVariants as p } from "./Card.variants.js"; import { useTheme as h } from "../../contexts/theme.hook.js"; const l = f( ({ className: s, theme: r, isActive: m, canHover: a, wrapperClassName: d, ...i }, c) => { const { theme: e } = h(); return /* @__PURE__ */ o( "div", { className: t( p({ canHover: a, className: d, isActive: m, theme: r ?? e }) ), children: /* @__PURE__ */ o( "div", { ref: c, className: t( n({ className: s, theme: r ?? e, isActive: m, canHover: a }) ), ...i } ) } ); } ); l.displayName = "Card"; export { l as Card };