11import React from 'react' ;
22import PropTypes from 'prop-types' ;
33import clsx from 'clsx' ;
4- import { hsl , parseToHsl } from 'polished' ;
54import { withStyles , lighten , darken } from '@material-ui/core/styles' ;
65import Paper from '@material-ui/core/Paper' ;
76import SuccessOutlinedIcon from '../internal/svg-icons/SuccessOutlined' ;
@@ -15,7 +14,6 @@ import { capitalize } from '@material-ui/core/utils';
1514export 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 : {
0 commit comments