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