feat: add codemirror perf
This commit is contained in:
@@ -14,7 +14,7 @@ export const App = () => {
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path='/' element={<Navigate to='/modal/' />} />
|
||||
<Route path='/modal/*' element={<FlowApps />} />
|
||||
{/* <Route path='/modal/*' element={<FlowApps />} /> */}
|
||||
<Route path='/codemirror/*' element={<CodeMirrorApp />} />
|
||||
<Route path='/404' element={<div>404</div>} />
|
||||
<Route path='*' element={<div>404</div>} />
|
||||
|
||||
@@ -1,15 +1 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
h1 {
|
||||
@apply text-2xl font-bold;
|
||||
}
|
||||
h2 {
|
||||
@apply text-xl font-bold;
|
||||
}
|
||||
h3 {
|
||||
@apply text-lg font-bold;
|
||||
}
|
||||
}
|
||||
@import 'tailwindcss';
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { App } from './App.tsx';
|
||||
// import './tailwind.css';
|
||||
const App2 = () => {
|
||||
return <div>hello</div>;
|
||||
};
|
||||
import './globals.css';
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createEditorInstance } from '@kevisual/codemirror/json';
|
||||
import { createEditor } from '@kevisual/codemirror/json';
|
||||
import { useEffect, useRef } from 'react';
|
||||
export const App = () => {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
@@ -6,7 +6,7 @@ export const App = () => {
|
||||
init();
|
||||
}, []);
|
||||
const init = () => {
|
||||
const editor = createEditorInstance(ref.current!);
|
||||
const editor = createEditor(ref.current!);
|
||||
editor.dom.style.height = '100%';
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
Reference in New Issue
Block a user