Type errors in custom Tabs example
See original GitHub issue🐛 Bug report
The docs for creating custom Tab components have type errors. Specifically, themeKey
is not a key in StyledOptions
.
Argument of type '{ themeKey: string; }' is not assignable to parameter of type 'StyledOptions'.
Object literal may only specify known properties, and 'themeKey' does not exist in type 'StyledOptions'.
💥 Steps to reproduce
Copy the custom Tabs example into a TS project and observe TS error.
💻 Link to reproduction
https://codesandbox.io/s/custom-tabs-bug-erqe1?file=/src/CustomTabs.tsx
🧐 Expected behavior
No type errors.
🧭 Possible Solution
- Fix type definition of
StyledOptions
. - Update docs example if required.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Type errors in custom Tabs example · Issue #76 · chakra-ui ...
The docs for creating custom Tab components have type errors. Specifically, themeKey is not a key in StyledOptions .
Read more >Custom Tabs - Salesforce Help
Custom tabs let you display custom object data or other web content in Salesforce. When you add a custom tab to an app...
Read more >How to catch errors when using Chrome customTabs
I am trying to open a PDF file with Chrome customTab. However, I know that the PDF becomes available only during certain time...
Read more >Using Custom Chrome Tabs in your Android App - Medium
I am currently looking into retrieving the current URL from the Custom Tabs (available now) and will write again if I figure that...
Read more >Configuring Custom Tabs - Vault Help
For object type tabs, select the object followed by the object types. For document type tabs, select the document type, subtype, or classification....
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 Free
Top 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
I just ran into this trying to start with the example in the docs. Here is what I got working after converting the example to use the
useStyleConfig
hook:Same problem here, trying to implement chakra factory for a tab button: const StyledTab = chakra(“button”, { themeKey: “Tabs.Tab” })
Object literal may only specify known properties, and ‘themeKey’ does not exist in type ‘StyledOptions’.ts(2345)
any suggestions?