[ x ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
[ x ] I have read the documentation and cannot find an answer.
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.
Open the mdx-editor project in an IDE that supports TypeScript (e.g., IntelliJ, WebStorm).
Open controlled-mode.tsx.
Replace <BoldItalicUnderlineToggles /> with <BoldItalicUnderlineToggles options={['Bold', 'Italic']} />.
The IDE will show the following error: TS2322: Type '{ options: string[]; }' is not assignable to type 'IntrinsicAttributes'. Property 'options' does not exist on type 'IntrinsicAttributes'.
Expected behavior
Use <BoldItalicUnderlineToggles options={['Bold', 'Italic']} /> without any build or type issues.
Screenshots
Desktop (please complete the following information):
OS: [e.g. MacOS, Windows] - Windows can act funny sometimes.
Browser [e.g. Chrome, Safari]
Additional context
Add any other context about the problem here.
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 newoptions
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:
mdx-editor
project in an IDE that supports TypeScript (e.g., IntelliJ, WebStorm).controlled-mode.tsx
.<BoldItalicUnderlineToggles />
with<BoldItalicUnderlineToggles options={['Bold', 'Italic']} />
.TS2322: Type '{ options: string[]; }' is not assignable to type 'IntrinsicAttributes'. Property 'options' does not exist on type 'IntrinsicAttributes'.
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.