如何在材料UI中更改选项卡指示器的高度 [英] How do I change the height of the tab indicator in material ui
本文介绍了如何在材料UI中更改选项卡指示器的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在材质ui中更改选项卡指示器的高度/厚度
I would like to change the height/thickness of the tab indicator in material ui
从这里
对此
推荐答案
在v1.0.0-beta.37版本中删除了indicatorClassName
属性.现在,classes
属性是自定义v1中组件内部样式的标准方法.
The indicatorClassName
property was removed in the v1.0.0-beta.37 release. The classes
property is now the standard way to customize the internal styles of components in v1.
有关此更改的详细信息,请参见发行说明
For details about this change, see the release notes
// Define custom styles
const styles = theme => ({
bigIndicator: {
height: 5
}
})
<Tabs
/* use the `classes` property to inject styles for the indicator class */
classes={{ indicator: classes.bigIndicator }}
onChange={handleChange}
value={value}
>
<Tab label="Item One" />
<Tab label="Item Two" />
<Tab label="Item Three" />
</Tabs>
这是完整的在代码沙箱上的工作示例
这篇关于如何在材料UI中更改选项卡指示器的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文