🎥 Make videos programmatically with React
Remove unnecessary Editor Styles
ASchwad0a0371456dda
diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsxindex 083bf5361c..b87216374b 100644--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx+++ b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx@@ -11,7 +11,6 @@ import {import { EditorHeader } from "./EditorHeader";import { StreamingOverlay } from "./StreamingOverlay";-import { EDITOR_STYLES } from "./styles";// Monaco must be loaded client-side onlyconst MonacoEditor = dynamic(() => import("@monaco-editor/react"), {@@ -271,38 +270,41 @@ export const CodeEditor: React.FC<CodeEditorProps> = ({return (<div className="flex-2 h-[500px] lg:h-full flex flex-col min-w-0">- <h2 className="text-sm font-medium text-muted-foreground mb-3">Remotion Code</h2>+ <h2 className="text-sm font-medium text-muted-foreground mb-3">+ Remotion Code+ </h2><div className="flex-1 flex flex-col bg-background-editor rounded-lg overflow-hidden"><EditorHeader filename="MyAnimation.tsx" code={code} />- <style>{EDITOR_STYLES}</style>- <div className="flex-1 overflow-hidden relative">- <StreamingOverlay- visible={isStreaming}- message={streamPhase === "reasoning" ? "Thinking..." : "Generating code..."}- />- <MonacoEditor- height="100%"- language={editorLanguage}- theme="vs-dark"- path="MyAnimation.tsx"- value={code}- onChange={handleChange}- onMount={handleEditorMount}- options={{- minimap: { enabled: false },- fontSize: 14,- lineNumbers: "on",- scrollBeyondLastLine: false,- automaticLayout: true,- tabSize: 2,- wordWrap: "on",- padding: { top: 16 },- glyphMargin: false,- lineNumbersMinChars: 3,- folding: false,- }}- />- </div>+ <div className="flex-1 overflow-hidden relative">+ <StreamingOverlay+ visible={isStreaming}+ message={+ streamPhase === "reasoning" ? "Thinking..." : "Generating code..."+ }+ />+ <MonacoEditor+ height="100%"+ language={editorLanguage}+ theme="vs-dark"+ path="MyAnimation.tsx"+ value={code}+ onChange={handleChange}+ onMount={handleEditorMount}+ options={{+ minimap: { enabled: false },+ fontSize: 14,+ lineNumbers: "on",+ scrollBeyondLastLine: false,+ automaticLayout: true,+ tabSize: 2,+ wordWrap: "on",+ padding: { top: 16 },+ glyphMargin: false,+ lineNumbersMinChars: 3,+ folding: false,+ }}+ />+ </div></div></div>);diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.ts b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.tsdeleted file mode 100644index 731cb42bb6..0000000000--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.ts+++ /dev/null@@ -1,16 +0,0 @@-export const EDITOR_STYLES = `- /* Override Monaco's vs-dark background to be darker than header */- .monaco-editor,- .monaco-editor .overflow-guard,- .monaco-editor-background,- .monaco-editor .inputarea.ime-input,- .monaco-editor .margin {- background-color: #1e1e1e !important;- }- /* JSX syntax highlighting classes */- .jsx-tag-angle-bracket { color: #808080; }- .jsx-tag-name { color: #4ec9b0; }- .jsx-tag-attribute-key { color: #9cdcfe; }- .jsx-expression-braces { color: #ffd700; }- .jsx-text { color: #ce9178; }-`;