Skip to content

Commit

Permalink
fix(remote-code-editor): fix extra spacing on horizontal code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
printerscanner committed Dec 3, 2024
1 parent 904f23e commit 36ef476
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/xy-shared/widgets/remote-code-viewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { RemoteContent } from '../../components/remote-content';
import { SharedContext } from '../../context/shared-context';
import { CompiledMdx } from '../../types';


import './style.css';
import { OpenInStackblitz } from './open-in-stackblitz';
import { OpenInCodesandbox } from './open-in-codesandbox';
Expand All @@ -26,7 +25,6 @@ const defaultOptions = {
readOnly: false,
};


export type RemoteCodeViewerProps = {
route: string;
framework?: Framework;
Expand All @@ -52,7 +50,7 @@ export function RemoteCodeViewer({
}: RemoteCodeViewerProps) {
const _framework: Framework =
framework ?? (process.env.NEXT_PUBLIC_Framework as Framework) ?? 'react';

const preview = `${process.env.NEXT_PUBLIC_EXAMPLES_URL}/${_framework}/${route}/index.html`;

const isExample = route.includes('examples/');
Expand Down Expand Up @@ -91,7 +89,7 @@ export function RemoteCodeViewer({
)}
>
<div
style={{ height: editorHeight }}
style={isHorizontal ? {} : { height: editorHeight }}
className={clsx('relative', isHorizontal ? 'w-1/2' : '')}
>
<iframe
Expand Down

0 comments on commit 36ef476

Please sign in to comment.