Skip to content

🎥 Make videos programmatically with React

also fix the alignment of the frame

Jonny Burger69f671505b2e
diff --git a/packages/cli/src/editor/components/TimeValue.tsx b/packages/cli/src/editor/components/TimeValue.tsx
index 0391823658..4d2e49a787 100644
--- a/packages/cli/src/editor/components/TimeValue.tsx
+++ b/packages/cli/src/editor/components/TimeValue.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import {Internals, useCurrentFrame} from 'remotion';
import {useIsStill} from '../helpers/is-current-selected-still';
import {renderFrame} from '../state/render-frame';
-import {SPACING_UNIT} from './layout';
+import {Spacing} from './layout';
const text: React.CSSProperties = {
color: 'white',
@@ -17,16 +17,14 @@ const text: React.CSSProperties = {
const time: React.CSSProperties = {
display: 'inline-block',
fontSize: 18,
+ lineHeight: 1,
};
const frameStyle: React.CSSProperties = {
color: '#ccc',
fontSize: 10,
fontWeight: 500,
-};
-
-const spacer: React.CSSProperties = {
- width: SPACING_UNIT,
+ lineHeight: 1,
};
export const TimeValue: React.FC = () => {
@@ -44,8 +42,7 @@ export const TimeValue: React.FC = () => {
return (
<div style={text}>
- <div style={time}>{renderFrame(frame, config.fps)}</div>{' '}
- <div style={spacer} />
+ <div style={time}>{renderFrame(frame, config.fps)}</div> <Spacing x={1} />
<div style={frameStyle}>
{frame} <span style={frameStyle}>({config.fps} fps)</span>
</div>