@tdi2/di-core
Version:
TypeScript Dependency Injection 2 - Core DI framework
18 lines (17 loc) • 810 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// tools/functional-di-enhanced-transformer/__tests__/__fixtures__/conditional-rendering.basic.input.tsx
function ConditionalRendering(props) {
const { isEnabled, services } = props;
if (!isEnabled) {
return /* @__PURE__ */ React.createElement("div", null, "Feature disabled");
}
return /* @__PURE__ */ React.createElement("div", null, services.logger && /* @__PURE__ */ React.createElement("button", {
onClick: /* @__PURE__ */ __name(() => services.logger?.log("Button clicked"), "onClick")
}, "Log Click"));
}
__name(ConditionalRendering, "ConditionalRendering");
export {
ConditionalRendering
};
//# sourceMappingURL=conditional-rendering.basic.input.js.map