NativeBase
NativeBase copied to clipboard
Typescript autocomplete not showing custom variants
Description
Declaring a custom type for typescript support is not showing autocomplete suggestions
CodeSandbox/Snack link
https://snack.expo.dev/TxzqfrhF4
Steps to reproduce
- Setup the theme typings as described here
- Attempt to use the new Button variant
- Don't get an autocomplete suggestion for the new variants that have been added
NativeBase Version
3.3.7
Platform
- [ ] Android
- [ ] CRA
- [ ] Expo
- [X] iOS
- [ ] Next
Other Platform
No response
Additional Information
I don't get typescript errors when using these new variants so It would at least seem it's partially working but VSCode does not give me any suggestions when attempting to use the new variants. Are there any other steps I need to do to get VSCode to suggest these new variants as values I can pass to variant
?
@jrdn91 Thanks for reporting! We will look into this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What is the correct way to setup the default theme for the Button
component?
The
variants
props have only any
type, and there are no examples in the docs...
For now, i don't know how to set the default style for different variants...
+1 for this issue. Observing same.
Hi Everyone, This issue is fixed in 3.4.14
. Closing the issue for now, feel free to open it if you have any doubts.