fix: improve type definitions and formatting in MarkdownEditor component
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import {
|
||||
type ComponentProps,
|
||||
forwardRef,
|
||||
useId,
|
||||
useImperativeHandle,
|
||||
@@ -35,6 +36,8 @@ type MarkdownEditorProps = {
|
||||
height: string
|
||||
}
|
||||
|
||||
type MdEditorToolbars = NonNullable<ComponentProps<typeof MdEditor>["toolbars"]>
|
||||
|
||||
export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>(
|
||||
function MarkdownEditor(
|
||||
{
|
||||
@@ -112,10 +115,9 @@ export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>
|
||||
"revoke",
|
||||
"next",
|
||||
showModeSwitch ? 1 : 0,
|
||||
"=",
|
||||
"preview",
|
||||
"previewOnly",
|
||||
],
|
||||
] as MdEditorToolbars,
|
||||
[showModeSwitch]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user