synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
29 lines (28 loc) • 1.02 kB
JavaScript
import { jsxs as r, jsx as e } from "react/jsx-runtime";
import { useState as l } from "react";
import { Markdown as m } from "../Markdown/MarkdownSynapse.js";
function f({ data: t }) {
const [a, i] = l(0);
return /* @__PURE__ */ r("div", { className: "control-container", children: [
/* @__PURE__ */ r("div", { className: "button-container", children: [
t?.map((n, s) => /* @__PURE__ */ e(
"button",
{
className: a === s ? "isSelected" : "",
onClick: () => i(s),
children: n.name
},
n.name
)),
/* @__PURE__ */ e("button", { className: "gap-fill" })
] }),
/* @__PURE__ */ e("div", { className: "content-container", children: t?.map((n, s) => {
const { ownerId: o, wikiId: c } = n;
return /* @__PURE__ */ e("span", { className: a === s ? "" : "hide", children: /* @__PURE__ */ e(m, { ownerId: o, wikiId: c }) }, o);
}) })
] });
}
export {
f as default
};
//# sourceMappingURL=Resources.Desktop.js.map