Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[palette] Standardize the secondary color #9918

Merged
merged 1 commit into from Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/api/icon-button.md
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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