UNPKG

@payfit/unity-components

Version:

20 lines (19 loc) 651 B
import { InlineFieldGroupContext as e } from "../InlineFieldGroup.context.js"; import { useContext as t } from "react"; import { jsx as n } from "react/jsx-runtime"; //#region src/components/inline-field-group/parts/InlineFieldGroupReadView.tsx function r({ children: r, className: i }) { let a = t(e); if (!a) throw Error("InlineFieldGroupReadView must be used within InlineFieldGroup"); let o = a.mode === "read"; return /* @__PURE__ */ n("div", { className: i, hidden: !o, "aria-hidden": !o, ...!o && { inert: "" }, children: r }); } r.displayName = "InlineFieldGroupReadView"; //#endregion export { r as InlineFieldGroupReadView };