Skip to content

Commit 594ec67

Browse files
Revert "[Alert] improve filled variant coloring"
This reverts commit e6aea69.
1 parent e6aea69 commit 594ec67

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

packages/material-ui-lab/src/Alert/Alert.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import clsx from 'clsx';
4-
import { hsl, parseToHsl } from 'polished';
54
import { withStyles, lighten, darken } from '@material-ui/core/styles';
65
import Paper from '@material-ui/core/Paper';
76
import SuccessOutlinedIcon from '../internal/svg-icons/SuccessOutlined';
@@ -15,7 +14,6 @@ import { capitalize } from '@material-ui/core/utils';
1514
export const styles = theme => {
1615
const getColor = theme.palette.type === 'light' ? darken : lighten;
1716
const getBackgroundColor = theme.palette.type === 'light' ? lighten : darken;
18-
const getColorWithLightness = (color, lightness) => hsl({ ...parseToHsl(color), lightness });
1917

2018
return {
2119
/* Styles applied to the root element. */
@@ -94,25 +92,25 @@ export const styles = theme => {
9492
filledSuccess: {
9593
color: '#fff',
9694
fontWeight: theme.typography.fontWeightMedium,
97-
backgroundColor: getColorWithLightness(theme.palette.success.main, 0.45),
95+
backgroundColor: theme.palette.success.main,
9896
},
9997
/* Styles applied to the root element if `variant="filled"` and `color="info"`. */
10098
filledInfo: {
10199
color: '#fff',
102100
fontWeight: theme.typography.fontWeightMedium,
103-
backgroundColor: getColorWithLightness(theme.palette.info.main, 0.45),
101+
backgroundColor: theme.palette.info.main,
104102
},
105103
/* Styles applied to the root element if `variant="filled"` and `color="warning"`. */
106104
filledWarning: {
107105
color: '#fff',
108106
fontWeight: theme.typography.fontWeightMedium,
109-
backgroundColor: getColorWithLightness(theme.palette.warning.main, 0.45),
107+
backgroundColor: theme.palette.warning.main,
110108
},
111109
/* Styles applied to the root element if `variant="filled"` and `color="error"`. */
112110
filledError: {
113111
color: '#fff',
114112
fontWeight: theme.typography.fontWeightMedium,
115-
backgroundColor: getColorWithLightness(theme.palette.error.main, 0.45),
113+
backgroundColor: theme.palette.error.main,
116114
},
117115
/* Styles applied to the icon wrapper element. */
118116
icon: {

packages/material-ui/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"convert-css-length": "^2.0.1",
5858
"hoist-non-react-statics": "^3.2.1",
5959
"normalize-scroll-left": "^0.2.0",
60-
"polished": "^3.4.2",
6160
"popper.js": "^1.14.1",
6261
"prop-types": "^15.7.2",
6362
"react-is": "^16.8.0",

yarn.lock

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11532,13 +11532,6 @@ pngjs@^2.2.0:
1153211532
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-2.3.1.tgz#11d1e12b9cb64d63e30c143a330f4c1f567da85f"
1153311533
integrity sha1-EdHhK5y2TWPjDBQ6Mw9MH1Z9qF8=
1153411534

11535-
polished@^3.4.2:
11536-
version "3.4.2"
11537-
resolved "https://registry.yarnpkg.com/polished/-/polished-3.4.2.tgz#b4780dad81d64df55615fbfc77acb52fd17d88cd"
11538-
integrity sha512-9Rch6iMZckABr6EFCLPZsxodeBpXMo9H4fRlfR/9VjMEyy5xpo1/WgXlJGgSjPyVhEZNycbW7UmYMNyWS5MI0g==
11539-
dependencies:
11540-
"@babel/runtime" "^7.6.3"
11541-
1154211535
popper.js@^1.14.1:
1154311536
version "1.16.0"
1154411537
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3"

0 commit comments

Comments
 (0)