refactor: remove dark mode functionality from text editor components
This commit is contained in:
@@ -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()}
|
||||
|
||||
Reference in New Issue
Block a user