question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tabs Component Typescript definition has no defaults

See original GitHub issue

Current 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:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
samtjocommented, Feb 4, 2021

Thanks for clarifying @PaulSumner-Sage - I’ll get this added onto our backlog

0reactions
carboncicommented, May 11, 2021

🎉 This issue has been resolved in version 72.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found