UNPKG

@eristack/policy-ui

Version:
26 lines (25 loc) • 693 B
// src/can.tsx import { Fragment, jsx } from "react/jsx-runtime"; function Can({ permission: _permission, allowed = true, children, fallback = null }) { return allowed ? /* @__PURE__ */ jsx(Fragment, { children }) : /* @__PURE__ */ jsx(Fragment, { children: fallback }); } // src/business-policy-gate.tsx import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime"; function BusinessPolicyGate({ policyId: _policyId, allowed = true, children, fallback = null }) { return allowed ? /* @__PURE__ */ jsx2(Fragment2, { children }) : /* @__PURE__ */ jsx2(Fragment2, { children: fallback }); } export { BusinessPolicyGate, Can }; //# sourceMappingURL=index.js.map