Tabs Component Typescript definition has no defaults
See original GitHub issueCurrent behaviour
The Tabs Typescript definition file requires that all props be defined when implements, while on Carbon most props have a default value, which is not being reflected.
Expected behaviour
Only changes to default values should need specifying
Reproducible example
Suggested solution(s)
Altering the typescript definition to include the same default values as specified on the Carbon docs page. Adding default values for props to match docs:
renderHiddenTabs true
align "left"
position "top"
setLocation true
size "default"
extendedLine true
borders "off"
variant "default"
Additional context
Your environment
Software | Version(s) |
---|---|
carbon-react | |
carbon-factory | |
react-scripts | |
React | |
Browser | |
npm | |
Operating System |
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
import fails with 'no default export' · Issue #8 - GitHub
This import works fine under babel: import React from "react"; But under TypeScript it complains of: (1,8): error TS1192: Module ...
Read more >reactjs - Typescript says a prop does not exist on a component ...
As you can see I am trying to specify that the props for CustomTab will be the same props as the Tab component....
Read more >TSConfig Reference - Docs on every TSConfig option
Intro to the TSConfig Reference. A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript...
Read more >How to build a tab component in React - LogRocket Blog
Learn how to build a tab component in React, an essential detail for React apps that provide a clean and organized view for...
Read more >Example of Tabs with Automatic Activation | APG | WAI - W3C
The code in this example is not intended for production environments. ... contrast settings can both distinguish the active (selected) tab ...
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 for clarifying @PaulSumner-Sage - I’ll get this added onto our backlog
🎉 This issue has been resolved in version 72.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀