Skip to content

🎥 Make videos programmatically with React

layout

Jonny Burgerd96fc8633f8b
diff --git a/packages/cli/src/editor/components/RenderModal/RenderModal.tsx b/packages/cli/src/editor/components/RenderModal/RenderModal.tsx
index 9cd4ac6596..f21a364d15 100644
--- a/packages/cli/src/editor/components/RenderModal/RenderModal.tsx
+++ b/packages/cli/src/editor/components/RenderModal/RenderModal.tsx
@@ -136,10 +136,12 @@ export const RenderModal: React.FC<{composition: TCompMetadata}> = ({
<div>
<RemotionInput type="text" value={outName} />
</div>
- <Spacing y={0.5} />
- <Button onClick={onClick} disabled={state.type === 'load'}>
- {state.type === 'idle' ? 'Render' : 'Rendering...'}
- </Button>
+ <Spacing block y={0.5} />
+ <div>
+ <Button onClick={onClick} disabled={state.type === 'load'}>
+ {state.type === 'idle' ? 'Render' : 'Rendering...'}
+ </Button>
+ </div>
</div>
</ModalContainer>
);
diff --git a/packages/cli/src/editor/components/layout.tsx b/packages/cli/src/editor/components/layout.tsx
index 0fb129749c..fb517a7db4 100644
--- a/packages/cli/src/editor/components/layout.tsx
+++ b/packages/cli/src/editor/components/layout.tsx
@@ -5,14 +5,15 @@ export const SPACING_UNIT = 8;
export const Spacing: React.FC<{
x?: number;
y?: number;
-}> = ({x = 0, y = 0}) => {
+ block?: boolean;
+}> = ({x = 0, y = 0, block = false}) => {
const style = useMemo((): React.CSSProperties => {
return {
- display: 'inline-block',
+ display: block ? 'block' : 'inline-block',
width: x * SPACING_UNIT,
height: y * SPACING_UNIT,
};
- }, [x, y]);
+ }, [block, x, y]);
return <div style={style} />;
};