Skip to content

Commit

Permalink
Fixed tab selector
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Dec 23, 2022
1 parent 002bb16 commit b94fade
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ const styles = theme => ({
tab: {
width: '100%',
minHeight: '100%'
}
},
selected: {
color: theme.palette.mode === 'dark' ? undefined : '#FFF !important',
},
indicator: {
backgroundColor: theme.palette.mode === 'dark' ? theme.palette.secondary.main : '#FFF',
},
});

const tabs = [
Expand Down Expand Up @@ -121,9 +127,12 @@ class App extends GenericApp {
<Tabs
value={this.getSelectedTab()}
onChange={(e, index) => this.selectTab(tabs[index].name, index)}
variant="scrollable" scrollButtons="auto"
variant="scrollable"
scrollButtons="auto"
classes={{ indicator: this.props.classes.indicator }}
>
{tabs.map(tab => <Tab
classes={{ selected: this.props.classes.selected }}
label={tab.icon ? <>{tab.icon}{I18n.t(tab.title)}</> : I18n.t(tab.title)}
data-name={tab.name}
key={tab.name}
Expand Down

0 comments on commit b94fade

Please sign in to comment.