🎥 Make videos programmatically with React
@remotion/studio: Move CodeFrame to shared components
Jonny Burgera46b008b1959
diff --git a/packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsx b/packages/studio/src/components/CodeFrame.tsxsimilarity index 93%rename from packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsxrename to packages/studio/src/components/CodeFrame.tsxindex 0481a1c0fe..fe799b2c9c 100644--- a/packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsx+++ b/packages/studio/src/components/CodeFrame.tsx@@ -1,7 +1,5 @@import type {ScriptLine} from '@remotion/studio-shared';import React from 'react';-import {LazySyntaxHighlightedSource} from '../../components/LazySyntaxHighlightedSource';-import {HORIZONTAL_SCROLLBAR_CLASSNAME} from '../../components/Menu/is-menu-item';import {ERROR_CODE_FRAME_BACKGROUND,ERROR_CODE_FRAME_LINE_BACKGROUND,@@ -9,7 +7,9 @@ import {TRANSPARENT,WHITE,WHITE_ALPHA_40,-} from '../../helpers/colors';+} from '../helpers/colors';+import {LazySyntaxHighlightedSource} from './LazySyntaxHighlightedSource';+import {HORIZONTAL_SCROLLBAR_CLASSNAME} from './Menu/is-menu-item';const frame: React.CSSProperties = {backgroundColor: ERROR_CODE_FRAME_BACKGROUND,diff --git a/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx b/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsxindex 45b3acabcf..dd7991415c 100644--- a/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx+++ b/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx@@ -4,6 +4,7 @@ import type {} from '@remotion/studio-shared';import React, {useCallback, useState} from 'react';import {Button} from '../../components/Button';+import {CodeFrame} from '../../components/CodeFrame';import {BORDER_WHITE_ALPHA_12,LIGHT_TEXT,@@ -17,7 +18,6 @@ import {} from '../../helpers/hoverable';import {openInEditor} from '../../helpers/open-in-editor';import {CaretDown} from '../../icons/caret';-import {CodeFrame} from './CodeFrame';import {formatLocation} from './format-location';const location: React.CSSProperties = {