Skip to content

Commit

Permalink
[palette] Standardize the secondary color
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 19, 2018
1 parent ac58d7b commit 011ebbf
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions pages/api/icon-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Any other properties supplied will be [spread to the root element](/guides/api#s
You can override all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:
- `root`
- `colorSecondary`
- `colorPrimary`
- `colorInherit`
- `colorPrimary`
- `colorSecondary`
- `disabled`
- `label`
- `icon`
Expand Down
2 changes: 1 addition & 1 deletion pages/api/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Any other properties supplied will be [spread to the root element](/guides/api#s
You can override all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:
- `root`
- `colorPrimary`
- `colorSecondary`
- `colorAction`
- `colorDisabled`
- `colorError`
- `colorPrimary`

Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/v1-beta/src/Icon/Icon.js)
Expand Down
2 changes: 1 addition & 1 deletion pages/api/svg-icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Any other properties supplied will be [spread to the root element](/guides/api#s
You can override all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:
- `root`
- `colorPrimary`
- `colorSecondary`
- `colorAction`
- `colorDisabled`
- `colorError`
- `colorPrimary`

Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/v1-beta/src/SvgIcon/SvgIcon.js)
Expand Down
8 changes: 4 additions & 4 deletions pages/api/tab.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ You can override all the class names injected by Material-UI thanks to the `clas
This property accepts the following keys:
- `root`
- `rootLabelIcon`
- `rootSecondary`
- `rootSecondarySelected`
- `rootSecondaryDisabled`
- `rootInherit`
- `rootPrimary`
- `rootPrimarySelected`
- `rootPrimaryDisabled`
- `rootInherit`
- `rootSecondary`
- `rootSecondarySelected`
- `rootSecondaryDisabled`
- `rootInheritSelected`
- `rootInheritDisabled`
- `fullWidth`
Expand Down
2 changes: 1 addition & 1 deletion pages/api/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ This property accepts the following keys:
- `paragraph`
- `colorInherit`
- `colorPrimary`
- `colorTextSecondary`
- `colorSecondary`
- `colorTextSecondary`
- `colorError`

Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
Expand Down
4 changes: 2 additions & 2 deletions src/AppBar/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const styles = theme => ({
color: theme.palette.primary.contrastText,
},
colorSecondary: {
backgroundColor: theme.palette.secondary.light,
color: theme.palette.getContrastText(theme.palette.secondary.light),
backgroundColor: theme.palette.secondary.main,
color: theme.palette.secondary.contrastText,
},
});

Expand Down
4 changes: 2 additions & 2 deletions src/Badge/Badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const styles = theme => ({
color: theme.palette.primary.contrastText,
},
colorSecondary: {
backgroundColor: theme.palette.secondary.light,
color: theme.palette.getContrastText(theme.palette.secondary.light),
backgroundColor: theme.palette.secondary.main,
color: theme.palette.secondary.contrastText,
},
});

Expand Down
10 changes: 5 additions & 5 deletions src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export const styles = theme => ({
},
},
flatSecondary: {
color: theme.palette.secondary.light,
color: theme.palette.secondary.main,
'&:hover': {
backgroundColor: fade(theme.palette.secondary.light, 0.12),
backgroundColor: fade(theme.palette.secondary.main, 0.12),
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: 'transparent',
Expand Down Expand Up @@ -110,12 +110,12 @@ export const styles = theme => ({
},
raisedSecondary: {
color: theme.palette.secondary.contrastText,
backgroundColor: theme.palette.secondary.light,
backgroundColor: theme.palette.secondary.main,
'&:hover': {
backgroundColor: theme.palette.secondary.main,
backgroundColor: theme.palette.secondary.dark,
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: theme.palette.secondary.light,
backgroundColor: theme.palette.secondary.main,
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions src/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ export const styles = theme => ({
root: {
userSelect: 'none',
},
colorPrimary: {
color: theme.palette.primary.main,
},
colorSecondary: {
color: theme.palette.secondary.light,
color: theme.palette.secondary.main,
},
colorAction: {
color: theme.palette.action.active,
Expand All @@ -20,9 +23,6 @@ export const styles = theme => ({
colorError: {
color: theme.palette.error.main,
},
colorPrimary: {
color: theme.palette.primary.main,
},
});

function Icon(props) {
Expand Down
8 changes: 4 additions & 4 deletions src/IconButton/IconButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export const styles = theme => ({
duration: theme.transitions.duration.shortest,
}),
},
colorSecondary: {
color: theme.palette.secondary.light,
colorInherit: {
color: 'inherit',
},
colorPrimary: {
color: theme.palette.primary.main,
},
colorInherit: {
color: 'inherit',
colorSecondary: {
color: theme.palette.secondary.main,
},
disabled: {
color: theme.palette.action.disabled,
Expand Down
2 changes: 1 addition & 1 deletion src/Progress/CircularProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const styles = theme => ({
color: theme.palette.primary.main,
},
colorSecondary: {
color: theme.palette.secondary.light,
color: theme.palette.secondary.main,
},
svgIndeterminate: {
animation: 'mui-progress-circular-rotate 1.4s linear infinite',
Expand Down
8 changes: 4 additions & 4 deletions src/SvgIcon/SvgIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ export const styles = theme => ({
duration: theme.transitions.duration.shorter,
}),
},
colorPrimary: {
color: theme.palette.primary.main,
},
colorSecondary: {
color: theme.palette.secondary.light,
color: theme.palette.secondary.main,
},
colorAction: {
color: theme.palette.action.active,
Expand All @@ -28,9 +31,6 @@ export const styles = theme => ({
colorError: {
color: theme.palette.error.main,
},
colorPrimary: {
color: theme.palette.primary.main,
},
});

function SvgIcon(props) {
Expand Down
22 changes: 11 additions & 11 deletions src/Tabs/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,9 @@ export const styles = theme => ({
rootLabelIcon: {
height: 72,
},
rootSecondary: {
color: theme.palette.text.secondary,
},
rootSecondarySelected: {
color: theme.palette.secondary.light,
},
rootSecondaryDisabled: {
color: theme.palette.text.disabled,
rootInherit: {
color: 'inherit',
opacity: 0.7,
},
rootPrimary: {
color: theme.palette.text.secondary,
Expand All @@ -43,9 +38,14 @@ export const styles = theme => ({
rootPrimaryDisabled: {
color: theme.palette.text.disabled,
},
rootInherit: {
color: 'inherit',
opacity: 0.7,
rootSecondary: {
color: theme.palette.text.secondary,
},
rootSecondarySelected: {
color: theme.palette.secondary.main,
},
rootSecondaryDisabled: {
color: theme.palette.text.disabled,
},
rootInheritSelected: {
opacity: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/Tabs/TabIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const styles = theme => ({
backgroundColor: theme.palette.primary.main,
},
colorSecondary: {
backgroundColor: theme.palette.secondary.light,
backgroundColor: theme.palette.secondary.main,
},
});

Expand Down
6 changes: 3 additions & 3 deletions src/Typography/Typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export const styles = theme => ({
colorPrimary: {
color: theme.palette.primary.main,
},
colorTextSecondary: {
color: theme.palette.text.secondary,
},
colorSecondary: {
color: theme.palette.secondary.main,
},
colorTextSecondary: {
color: theme.palette.text.secondary,
},
colorError: {
color: theme.palette.error.main,
},
Expand Down

0 comments on commit 011ebbf

Please sign in to comment.