synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
34 lines (33 loc) • 971 B
JavaScript
import { jsxs as a, jsx as n } from "react/jsx-runtime";
import { useState as s } from "react";
import c from "../IconSvg/IconSvg.js";
function p({
title: t,
content: o
}) {
const [e, d] = s(!1);
return /* @__PURE__ */ a("div", { className: "ExpandableContent", children: [
/* @__PURE__ */ n("div", { className: "ExpandableContent__button__container", children: /* @__PURE__ */ a(
"button",
{
className: e ? "expanded" : "",
onClick: () => d(!e),
children: [
/* @__PURE__ */ n("span", { children: t }),
/* @__PURE__ */ n("span", { className: "SRC-primary-action-color", children: /* @__PURE__ */ n(c, { icon: e ? "close" : "add" }) })
]
}
) }),
/* @__PURE__ */ n(
"div",
{
className: `ExpandableContent__content__container ${e ? "" : "hide"}`,
children: o
}
)
] });
}
export {
p as default
};
//# sourceMappingURL=ExpandableContent.js.map