Skip to content

Commit

Permalink
Merge pull request #6 from yashpokar/bugfix/editor-bg-color
Browse files Browse the repository at this point in the history
Fixed the theme after component unmounted
  • Loading branch information
yashpokar authored Apr 2, 2024
2 parents 9380959 + fc02107 commit dd70d54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/ui/src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Editor: React.FC = () => {

useEffect(() => {
monaco?.editor.defineTheme('manas-ai', {
base: 'vs-dark',
base: isDarkMode ? 'vs-dark' : 'vs',
inherit: true,
rules: [],
colors: {
Expand All @@ -23,6 +23,7 @@ const Editor: React.FC = () => {
<div className="h-full w-full">
<CodeEditor
height="100%"
theme="manas-ai"
defaultLanguage="javascript"
defaultValue={`// Welcome to ManasAI Editor! 🚀
Expand Down

0 comments on commit dd70d54

Please sign in to comment.