Refactors to address CR
This commit is contained in:
parent
a563898a5f
commit
38a0e78873
|
@ -252,10 +252,10 @@ export const SquiggleItem: React.FC<SquiggleItemProps> = ({
|
|||
}
|
||||
default: {
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<span>No display for type: </span>{" "}
|
||||
<span className="font-semibold text-slate-600">{expression.tag}</span>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -384,11 +384,21 @@ export const SquigglePlayground: FC<PlaygroundProps> = ({
|
|||
</div>
|
||||
);
|
||||
|
||||
const InFirstTab: React.FC<{ children: React.ReactNode }> = ({
|
||||
children,
|
||||
}) => (
|
||||
<Tab.Panels>
|
||||
<Tab.Panel>{children}</Tab.Panel>
|
||||
<Tab.Panel>{samplingSettings}</Tab.Panel>
|
||||
<Tab.Panel>{viewSettings}</Tab.Panel>
|
||||
<Tab.Panel>{inputVariableSettings}</Tab.Panel>
|
||||
</Tab.Panels>
|
||||
);
|
||||
|
||||
let withEditor = (
|
||||
<div className="flex mt-1" style={{ height }}>
|
||||
<div className="w-1/2">
|
||||
<Tab.Panels>
|
||||
<Tab.Panel>
|
||||
<InFirstTab>
|
||||
<div className="border border-slate-200">
|
||||
<CodeEditor
|
||||
value={squiggleString}
|
||||
|
@ -398,11 +408,7 @@ export const SquigglePlayground: FC<PlaygroundProps> = ({
|
|||
height={height - 1}
|
||||
/>
|
||||
</div>
|
||||
</Tab.Panel>
|
||||
<Tab.Panel>{samplingSettings}</Tab.Panel>
|
||||
<Tab.Panel>{viewSettings}</Tab.Panel>
|
||||
<Tab.Panel>{inputVariableSettings}</Tab.Panel>
|
||||
</Tab.Panels>
|
||||
</InFirstTab>
|
||||
</div>
|
||||
|
||||
<div className="w-1/2 p-2 pl-4">
|
||||
|
@ -423,8 +429,7 @@ export const SquigglePlayground: FC<PlaygroundProps> = ({
|
|||
|
||||
let withoutEditor = (
|
||||
<div className="mt-3">
|
||||
<Tab.Panels>
|
||||
<Tab.Panel>
|
||||
<InFirstTab>
|
||||
<SquiggleChart
|
||||
squiggleString={squiggleString}
|
||||
environment={env}
|
||||
|
@ -436,11 +441,7 @@ export const SquigglePlayground: FC<PlaygroundProps> = ({
|
|||
jsImports={imports}
|
||||
showSummary={vars.showSummary}
|
||||
/>
|
||||
</Tab.Panel>
|
||||
<Tab.Panel>{samplingSettings}</Tab.Panel>
|
||||
<Tab.Panel>{viewSettings}</Tab.Panel>
|
||||
<Tab.Panel>{inputVariableSettings}</Tab.Panel>
|
||||
</Tab.Panels>
|
||||
</InFirstTab>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user