-
- {/* Sequence of input parameters */}
-
- { (resolved.kind === "error") && resolved.e.toString()
- || (resolved.kind === "value") &&
- || "unknown" }
+
+
+
+
+ {/* Sequence of input parameters */}
+
+ { (resolved.kind === "error") && resolved.e.toString()
+ || (resolved.kind === "value") &&
+ || "unknown" }
+
-
+
;
}
@@ -102,12 +99,12 @@ function FunctionHeader(props) {
// end of recursion - draw function name
return
𝑓𝑛
-
+
;
}
}
-function InputParams({ depth, errorDepth, addParam, ...rest }) {
+function InputParams({ depth, errorDepth, ...rest }) {
const env = useContext(EnvContext);
const globalContext = useContext(GlobalContext);
const isOffending = depth === errorDepth;
@@ -118,12 +115,10 @@ function InputParams({ depth, errorDepth, addParam, ...rest }) {
{...nestedFnProperties(rest as CallBlockProps, env)}
depth={depth+1}
errorDepth={errorDepth}
- addParam={addParam}
/>}
{/* Our own input param */}
;
}
diff --git a/src/CallContext.ts b/src/CallContext.ts
new file mode 100644
index 0000000..00d1f12
--- /dev/null
+++ b/src/CallContext.ts
@@ -0,0 +1,7 @@
+import { createContext } from "react";
+
+interface ICallContext {
+ addParam?: () => void;
+}
+
+export const CallContext = createContext