Intellisense doesn't work when passing an Hope UI component to the `as`prop.
See original GitHub issueWhen passing an Hope UI component to the as
prop, the props of the component passed doesn’t get intellisense.
In the below example we don’t get intellisense for the colorScheme
prop of Button
.
<MenuTrigger as={Button} colorScheme="primary">
Button
</MenuTrigger>
This is caused by a wrong TypeScript type definition.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
How can I get vscode intellisense to work when customizing ...
This one provides syntax highlighting and IntelliSense for styled-components. https://marketplace.visualstudio.com/items?
Read more >Build Strongly-Typed Polymorphic Components with React ...
1. The as prop can receive invalid HTML elements. Presently, it is possible for a user to go ahead and write the following:...
Read more >Intellisense doesn't work for a Class Instance returned from ...
I have an object called Game which contains a dictionary of two Team objects. The Game class has a method which returns a...
Read more >Build a React Web App with Laravel Sanctum Part 1: Login
We check if the user is logged in, if it's fullfiled the original component (which is passed by as prop) will be render,...
Read more >A fun community for developers to connect over code, tech ...
A community of over 30000 software developers who really understand what’s got you feeling like a coding genius or like you’re surrounded by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, but I’m working on a overall redesign of this project so it will be part of that process
I think new version of typescript support this? https://twitter.com/diegohaz/status/1526618550105870337?s=20&t=Y55pJmrm7AwdZyIhypGiAQ