@frontify/fondue
Version:
Design system of Frontify
55 lines (54 loc) • 1.57 kB
JavaScript
import { jsxs as d, jsx as r } from "react/jsx-runtime";
import c from "../../../../../foundation/Icon/Generated/IconPeople12.es.js";
import { MentionableCategory as i } from "../types.es.js";
const p = ({ attributes: a, element: o, nodeProps: t, children: n }) => /* @__PURE__ */ r(
"span",
{
...a,
dir: "auto",
"data-slate-value": o == null ? void 0 : o.value,
"data-slate-key": o == null ? void 0 : o.key,
"data-slate-category": o == null ? void 0 : o.category,
contentEditable: !1,
style: {
lineHeight: "10px",
padding: "1px",
margin: "0 1px",
fontWeight: "bold",
verticalAlign: "baseline",
display: "inline-block",
borderRadius: "2px",
backgroundColor: "rgb(227, 232, 246)",
color: "rgb(130, 95, 255)"
},
...t,
children: n
}
), l = ({ children: a, ...o }) => /* @__PURE__ */ d(p, { ...o, children: [
/* @__PURE__ */ r(
"span",
{
style: {
paddingRight: "3px",
display: "inline-block",
margin: "-1px 0"
},
children: /* @__PURE__ */ r(c, {})
}
),
a
] }), g = ({ children: a, ...o }) => /* @__PURE__ */ d(p, { ...o, children: [
"@",
a
] }), u = ({ children: a, ...o }) => /* @__PURE__ */ r(p, { ...o, children: a }), x = ({ category: a, children: o, ...t }) => {
const n = {
[i.USER]: u,
[i.GROUP]: l,
[i.ALL]: g
}, s = n[a] ?? n[i.USER];
return /* @__PURE__ */ r(s, { ...t, children: o });
};
export {
x as MarkupElementNodeComponent
};
//# sourceMappingURL=MarkupElementNode.es.js.map