diff --git a/src/interface/components/CodeEditor.tsx b/src/interface/components/CodeEditor.tsx index 887531ad..43250d60 100644 --- a/src/interface/components/CodeEditor.tsx +++ b/src/interface/components/CodeEditor.tsx @@ -5,7 +5,7 @@ import { less } from '@codemirror/lang-less' import { useCallback, useEffect, useState } from 'react'; import './CodeEditor.css' -export default function CodeEditor({ callback, initialState, height }: { callback: (value: string) => void, initialState: string, height: string }) { +export default function CodeEditor({ callback, initialState, height, className }: { callback: (value: string) => void, initialState: string, height: string, className?: string}) { const [value, setValue] = useState(initialState) const [darkMode, setDarkMode] = useState(false) @@ -31,7 +31,7 @@ export default function CodeEditor({ callback, initialState, height }: { callbac }} theme={ darkMode ? githubDark : githubLight } placeholder={"Happy coding!"} - className='rounded-lg text-[13px]' + className={`rounded-lg text-[13px] ${className}`} value={value} height={height} extensions={[less(), color]} diff --git a/src/interface/pages/ThemeCreator.tsx b/src/interface/pages/ThemeCreator.tsx index e64b8e70..1e652150 100644 --- a/src/interface/pages/ThemeCreator.tsx +++ b/src/interface/pages/ThemeCreator.tsx @@ -15,6 +15,15 @@ export default function ThemeCreator() { CustomImages: [] }); + function saveTheme() { + console.log(theme); + } + + function CodeUpdate(value: string) { + console.log(value); + setTheme((previousTheme) => ({ ...previousTheme, CustomCSS: value })); + } + return (