mirror of
https://github.com/ritz078/transform.git
synced 2026-11-21 16:43:56 +03:00
fix(preview): showPreview toggle working
This commit is contained in:
1 parent
1bd559514b
commit
314a626f34
2 files changed
+28
-18
No files matched your search
@@ -101,7 +101,13 @@ const ConversionPanel: React.FunctionComponent<
|
||||
|
||||
return (
|
||||
<>
|
||||
<Pane display="flex" flexDirection="row" overflow="hidden" flex={1}>
|
||||
<Pane
|
||||
display="flex"
|
||||
flexDirection="row"
|
||||
overflow="hidden"
|
||||
flex={1}
|
||||
height={"calc(100vh - 40px)"}
|
||||
>
|
||||
<Pane
|
||||
display="flex"
|
||||
flex={1}
|
||||
|
||||
+21
-17
@@ -182,6 +182,8 @@ export default function({
|
||||
setValue(defaultValue);
|
||||
}, [defaultValue]);
|
||||
|
||||
console.log(showPreview);
|
||||
|
||||
return (
|
||||
<Pane display="flex" flex={1} flexDirection="column" overflow="hidden">
|
||||
<Pane
|
||||
@@ -309,25 +311,27 @@ export default function({
|
||||
)}
|
||||
</Pane>
|
||||
|
||||
{topNotifications &&
|
||||
topNotifications({
|
||||
isSettingsOpen: showSettingsDialogue,
|
||||
toggleSettings: _toggleSettingsDialog
|
||||
})}
|
||||
<Pane display="flex" flexDirection="column" flex={1} overflow="hidden">
|
||||
{topNotifications &&
|
||||
topNotifications({
|
||||
isSettingsOpen: showSettingsDialogue,
|
||||
toggleSettings: _toggleSettingsDialog
|
||||
})}
|
||||
|
||||
<Monaco
|
||||
language={language}
|
||||
value={value}
|
||||
options={options}
|
||||
onChange={value => {
|
||||
setValue(value);
|
||||
onChange(value);
|
||||
}}
|
||||
innerRef={editorRef}
|
||||
/>
|
||||
<Monaco
|
||||
language={language}
|
||||
value={value}
|
||||
options={options}
|
||||
onChange={value => {
|
||||
setValue(value);
|
||||
onChange(value);
|
||||
}}
|
||||
innerRef={editorRef}
|
||||
/>
|
||||
</Pane>
|
||||
|
||||
{IN_BROWSER && showPreview && previewElement && (
|
||||
<>
|
||||
<Pane display="flex" flex={1} flexDirection="column" overflow="hidden">
|
||||
<Pane
|
||||
height={50}
|
||||
backgroundColor="#fff"
|
||||
@@ -359,7 +363,7 @@ export default function({
|
||||
>
|
||||
{previewElement(value)}
|
||||
</Pane>
|
||||
</>
|
||||
</Pane>
|
||||
)}
|
||||
</Pane>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user