diff options
Diffstat (limited to 'src/components/function_box.tsx')
-rw-r--r-- | src/components/function_box.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/function_box.tsx b/src/components/function_box.tsx index d116a47..b2221b4 100644 --- a/src/components/function_box.tsx +++ b/src/components/function_box.tsx @@ -20,7 +20,7 @@ export interface FunctionBoxProps extends NodeProps { arity?: number; - isChild?: boolean; + isChild?: boolean; // todo: attach DNA } type FunctionArgs = { node?: Node; val: any }[]; @@ -59,7 +59,7 @@ export class FunctionBox extends Node { this.arity = props?.arity ?? 1; if (props.fn) { - this.source = props.fn.toString(); + this.source = props.source ?? props.fn.toString(); this.function = props.fn; } else { this.source = props?.source ?? `(x: number): number => x + 2`; @@ -273,7 +273,7 @@ export class FunctionBox extends Node { <CodeBlock fontFamily={theme.font} language="typescript" - fontSize={15} + fontSize={this.outputFontSize} code={JSON.stringify(output, null, 2)} ></CodeBlock>, ); |