Added VariableBox for functiona and function declaration

This commit is contained in:
Ozzie Gooen 2022-05-26 08:30:37 -04:00
parent d630f7335d
commit 554e50901e

View File

@ -228,6 +228,7 @@ const SquiggleItem: React.FC<SquiggleItemProps> = ({
}
case "lambda":
return (
<VariableBox heading="Function" showTypes={showTypes}>
<FunctionChart
fn={expression.value}
chartSettings={chartSettings}
@ -236,9 +237,11 @@ const SquiggleItem: React.FC<SquiggleItemProps> = ({
xyPointLength: environment.xyPointLength / 10,
}}
/>
</VariableBox>
);
case "lambdaDeclaration": {
return (
<VariableBox heading="Function Declaration" showTypes={showTypes}>
<FunctionChart
fn={expression.value.fn}
chartSettings={getChartSettings(expression.value)}
@ -247,6 +250,7 @@ const SquiggleItem: React.FC<SquiggleItemProps> = ({
xyPointLength: environment.xyPointLength / 10,
}}
/>
</VariableBox>
);
}
default: {