@clubmed/trident-ui
Version:
Shared ClubMed React UI components
38 lines (37 loc) • 858 B
JavaScript
import { jsx as l } from "react/jsx-runtime";
import { c as x } from "../../chunks/clsx.js";
import "react";
import { useCardBackground as i } from "./CardBackgroundContext.js";
const d = ({
children: t,
className: m,
coverLink: a = !1,
href: s,
onClick: r,
...p
}) => {
const e = !!s, { hasImage: o } = i(), c = e ? "a" : "div", n = e ? { href: s, onClick: r } : {};
return /* @__PURE__ */ l(
c,
{
className: x(
"pointer-events-auto flex w-full gap-x-8 px-12 pb-12 sm:px-24 sm:pb-24",
{
"justify-center text-center": !t,
"h-full items-end": a,
"mt-auto h-auto": !a,
"text-white": o,
"text-black": !o
},
m
),
...n,
...p,
children: t
}
);
};
export {
d as CardClickable
};
//# sourceMappingURL=CardClickable.js.map