You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ 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.
The text was updated successfully, but these errors were encountered:
fortySixAnd2
changed the title
[BUG] options props are not correctly defined for component BoldItalicUnderlineToggles
[BUG] options prop is not correctly defined for component BoldItalicUnderlineTogglesJun 25, 2024
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.
The text was updated successfully, but these errors were encountered: