Skip to content

Commit

Permalink
fix: rest props incorrect placement
Browse files Browse the repository at this point in the history
  • Loading branch information
Arif-un committed Aug 10, 2024
1 parent 07816e2 commit bf44032
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/MixInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ const MixInput = forwardRef((props: MixInputProps, ref: ForwardedRef<MixInputRef
readonly = false,
tagClassName,
editorOptions,
className,
...restProps
} = props

const editorRef = useRef<HTMLDivElement>(null)

const editor = useEditor({
editorProps: { attributes: { class: 'mix-input' } },
editorProps: { attributes: { class: `mix-input ${className}`, ...(restProps as any) } },
extensions: [
Document,
Paragraph.configure({
Expand Down Expand Up @@ -65,7 +66,7 @@ const MixInput = forwardRef((props: MixInputProps, ref: ForwardedRef<MixInputRef
insertContent,
}))

return <EditorContent editor={editor} innerRef={editorRef} {...restProps} />
return <EditorContent editor={editor} innerRef={editorRef} />
})

export default MixInput

0 comments on commit bf44032

Please sign in to comment.