ArbitB
ArbitB

Reputation: 113

Changing color of material ui tab label

I tried to change the label color of tab to black but it doesn't change. Label color remains white only. Is it hard coded in material-ui only? If no, then how can I change it? This is what I tried

const styles = {
    tab: {
        padding: '2px 34px',
        width: '140px',
        height: '72px',
        color: '#4b4b4b'
    },
    tabItemContainer: {
        background: 'none'
    }
}
<Tabs
                        tabItemContainerStyle={styles.tabItemContainer}
                        value={this.state.selectedTab}
                        onChange={this.handleTabChange}>
                        <Tab
                            value={0}
                            buttonStyle={styles.tab}
                            label='Members'/>
                        <Tab
                            value={1}
                            buttonStyle={styles.tab}
                            label='Permissions'/>
                    </Tabs>

Upvotes: 1

Views: 6684

Answers (1)

Freez
Freez

Reputation: 7588

Try to use the style property instead of buttonStyle

<Tab
   value={0}
   style={styles.tab}
   label='Members'
/>

Upvotes: 2

Related Questions