Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fortySixAnd2 opened this issue Jun 25, 2024 · 1 comment
Labels
bug Something isn't working released

Comments

@fortySixAnd2
Copy link

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

  • [ 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.

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:

  • 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.

@fortySixAnd2 fortySixAnd2 added the bug Something isn't working label Jun 25, 2024
@fortySixAnd2 fortySixAnd2 changed the title [BUG] options props are not correctly defined for component BoldItalicUnderlineToggles [BUG] options prop is not correctly defined for component BoldItalicUnderlineToggles Jun 25, 2024
@petyosi petyosi closed this as completed in a3b0a16 Jul 2, 2024
Copy link

github-actions bot commented Jul 2, 2024

🎉 This issue has been resolved in version 3.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

1 participant