Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6119 from trufflesuite/beautif-ul
Browse files Browse the repository at this point in the history
  • Loading branch information
gnidan authored Jun 23, 2023
2 parents 113df41 + 1a34a6a commit a951ff7
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions packages/dashboard/src/components/composed/Debugger/Variables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,20 @@ const useStyles = createStyles(theme => ({
variablesContent: {
paddingLeft: 10
},
variablesSection: {
listStyleType: "none",
marginBlockStart: "0em",
marginBlockEnd: "0em",
marginInlineStart: "0em",
marginInlineEnd: "0em",
paddingInlineStart: "0em",
marginBottom: "1em"
},
variablesTypes: {
fontSize: 12,
fontWeight: 800
fontWeight: 800,
textDecoration: "underline",
marginBottom: "0.5em"
}
}));

Expand Down Expand Up @@ -75,12 +86,14 @@ function Variables({
.map((variableName: keyof typeof variables) => {
if (variables) {
return (
<>
<dt>{" " + variableName}</dt>
<dd>
<CodecComponents.Result data={variables[variableName]} />
</dd>
</>
<li key={variableName}>
<CodecComponents.NameValuePair
data={{
name: `${variableName}`,
value: variables[variableName]
}}
/>
</li>
);
} else {
return undefined;
Expand All @@ -89,10 +102,10 @@ function Variables({
.filter((item: JSX.Element | undefined) => item);
if (variableValues.length > 0) {
entries.push(
<dl key={section}>
<div key={section}>
<div className={classes.variablesTypes}>{section}</div>
{...variableValues}
</dl>
<ul className={classes.variablesSection}>{...variableValues}</ul>
</div>
);
}
}
Expand All @@ -101,7 +114,7 @@ function Variables({
}

getVariables();
}, [currentStep, session, classes.variablesTypes]);
}, [currentStep, session, classes.variablesTypes, classes.variablesSection]);

return (
<Flex direction="column" className={classes.variablesContainer}>
Expand Down

0 comments on commit a951ff7

Please sign in to comment.