TabIndicatorProps is useless #16697
Labels
component: tabs
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
v4.x
I am trying to restyle Tabs and Tabs indicator component. What I wanted to achieve is to make tab indicator smaller (80%). Is surprised me this is not possible in your current implementation. Documentation (https://material-ui.com/api/tabs) says that Tabs accept TabIndicatorProps that will be passed to indicator. However, the interface for it looks like this:
Accepted style property is
left
andwidth
as numbers. This is then used for indicator as left margin and width both in pixels. I believe width should acceptstring
values like80%
or100px
. Now it is inconsisted and missleading. It is also useless it will never be responsive.Expected Behavior 🤔
TabIndicatorProps should accept
style: { left: number; width: string }
and use width directly.Current Behavior 😯
TabIndicatorProps should accepts
style: { left: number; width: number }
and width can be customized in pixels only.Your Environment 🌎
The text was updated successfully, but these errors were encountered: