refactor: remove dark mode functionality from text editor components

This commit is contained in:
Ardeman
2025-03-06 08:56:03 +08:00
parent 5cf6eb191d
commit 32b435d762
4 changed files with 2 additions and 26 deletions
+1 -5
View File
@@ -53,7 +53,6 @@ export const TextEditor = <TFormValues extends Record<string, unknown>>(
const [isPlainHTML, setIsPlainHTML] = useState(false)
const [init, setInit] = useState(true)
const [darkMode, setDarkMode] = useState(false)
const generatedId = useId()
const {
@@ -129,16 +128,13 @@ export const TextEditor = <TFormValues extends Record<string, unknown>>(
category={category}
editor={editor}
setIsPlainHTML={setIsPlainHTML}
darkMode={darkMode}
setDarkMode={setDarkMode}
/>
<EditorContent
readOnly={disabled}
editor={editor}
id={id ?? generatedId}
className={twMerge(
'prose-invert max-h-96 max-w-none cursor-text overflow-y-auto rounded-[0_0_5px_5px] border border-[#D2D2D2] p-2',
darkMode ? 'bg-[#00000055]' : '',
'prose prose-headings:my-0 prose-p:my-0 max-h-96 max-w-none cursor-text overflow-y-auto rounded-[0_0_5px_5px] border border-[#D2D2D2] p-2',
inputClassName,
)}
onClick={() => editor?.commands.focus()}