xtreme-ui
Version:
Collection of reusable components that can be used in web projects
40 lines (39 loc) • 785 B
JavaScript
"use client";
import { jsx as l } from "react/jsx-runtime";
import { forwardRef as m } from "react";
import p from "clsx";
/* empty css */
import { EActionCardSize as t } from "./types.js";
const f = m((i, e) => {
const {
className: a,
children: c,
style: s = {},
size: r = "default",
onClick: n
} = i, o = Array.isArray(r) ? r : [t[r], t[r]], d = p(
"xtrActionCard",
"shadowRipple",
`${r}Size`,
a
);
return /* @__PURE__ */ l(
"div",
{
ref: e,
className: d,
style: {
"--cardWidth": `${o[0]}px`,
"--cardHeight": `${o[1]}px`,
...s
},
onClick: n,
role: "contentinfo",
children: c
}
);
});
f.displayName = "ActionCard";
export {
f as ActionCard
};