Skip to content

Joy UI styled component doesn't accept "component" prop #39774

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

Closed
2 tasks done
guoyunhe opened this issue Nov 6, 2023 · 1 comment
Closed
2 tasks done

Joy UI styled component doesn't accept "component" prop #39774

guoyunhe opened this issue Nov 6, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists package: joy-ui Specific to @mui/joy typescript

Comments

@guoyunhe
Copy link

guoyunhe commented Nov 6, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example:

Steps:

  1. Use styled to customize a Joy UI <Link/> component
  2. Use the customized <HeaderLink/> component to integrate with React Router
  3. Check TypeScript

Current behavior 😯

The component prop get errors:

图片

Expected behavior 🤔

The component prop should work.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
@guoyunhe guoyunhe added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 6, 2023
@mnajdova
Copy link
Member

mnajdova commented Nov 6, 2023

Please check #38274 (comment) - this is due to a TS limitation. Duplicate of #38274

@mnajdova mnajdova added typescript package: joy-ui Specific to @mui/joy duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 6, 2023
@mnajdova mnajdova closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists package: joy-ui Specific to @mui/joy typescript
Projects
None yet
Development

No branches or pull requests

2 participants