mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.57k stars 124 forks source link

[BUG] `options` prop is not correctly defined for component `BoldItalicUnderlineToggles` #510

Closed fortySixAnd2 closed 1 week ago

fortySixAnd2 commented 2 weeks ago

If you want to ask for support or request features, sponsor the project and contact me over email.

Describe the bug It seems that the BoldItalicUnderlineToggles component is not correctly defined to accept the new options prop.

When using <BoldItalicUnderlineToggles options={['Bold', 'Italic']} />, a build error occurs: TS2322: Type '{ options: string[]; }' is not assignable to type 'IntrinsicAttributes'. Property 'options' does not exist on type 'IntrinsicAttributes'.

From a runtime perspective, there are no issues with the new options prop.

Reproduction Start from https://codesandbox.io/p/sandbox/mdx-editor-base-q8s7zr?file=/src/App.tsx to reproduce the problem so that I can observe the issue on my side and make sure that the fix reliably addresses it.

To Reproduce Steps to reproduce the behavior:

Expected behavior Use <BoldItalicUnderlineToggles options={['Bold', 'Italic']} /> without any build or type issues.

Screenshots

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

github-actions[bot] commented 1 week ago

:tada: This issue has been resolved in version 3.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: