@@ -49,8 +49,7 @@ export const styles = theme => {
4949 } ,
5050 /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */
5151 clickable : {
52- // Remove grey highlight
53- WebkitTapHighlightColor : 'transparent' ,
52+ WebkitTapHighlightColor : 'transparent' , // Remove grey highlight
5453 cursor : 'pointer' ,
5554 '&:hover, &:focus' : {
5655 backgroundColor : emphasize ( backgroundColor , 0.08 ) ,
@@ -64,8 +63,7 @@ export const styles = theme => {
6463 * Styles applied to the root element if
6564 * `onClick` and `color="primary"` is defined or `clickable={true}`.
6665 */
67- clickablePrimary : {
68- // Remove grey highlight
66+ clickableColorPrimary : {
6967 '&:hover, &:focus' : {
7068 backgroundColor : emphasize ( theme . palette . primary . main , 0.08 ) ,
7169 } ,
@@ -77,8 +75,7 @@ export const styles = theme => {
7775 * Styles applied to the root element if
7876 * `onClick` and `color="secondary"` is defined or `clickable={true}`.
7977 */
80- clickableSecondary : {
81- // Remove grey highlight
78+ clickableColorSecondary : {
8279 '&:hover, &:focus' : {
8380 backgroundColor : emphasize ( theme . palette . secondary . main , 0.08 ) ,
8481 } ,
@@ -93,13 +90,13 @@ export const styles = theme => {
9390 } ,
9491 } ,
9592 /* Styles applied to the root element if `onDelete` and `color="primary"` is defined. */
96- deletablePrimary : {
93+ deletableColorPrimary : {
9794 '&:focus' : {
9895 backgroundColor : emphasize ( theme . palette . primary . main , 0.2 ) ,
9996 } ,
10097 } ,
10198 /* Styles applied to the root element if `onDelete` and `color="secondary"` is defined. */
102- deletableSecondary : {
99+ deletableColorSecondary : {
103100 '&:focus' : {
104101 backgroundColor : emphasize ( theme . palette . secondary . main , 0.2 ) ,
105102 } ,
@@ -113,12 +110,12 @@ export const styles = theme => {
113110 fontSize : theme . typography . pxToRem ( 16 ) ,
114111 } ,
115112 /* Styles applied to the `avatar` element if `checked={true}` and `color="primary"` */
116- avatarPrimary : {
113+ avatarColorPrimary : {
117114 color : darken ( theme . palette . primary . contrastText , 0.1 ) ,
118115 backgroundColor : theme . palette . primary . dark ,
119116 } ,
120117 /* Styles applied to the `avatar` element if `checked={true}` and `color="secondary"` */
121- avatarSecondary : {
118+ avatarColorSecondary : {
122119 color : darken ( theme . palette . secondary . contrastText , 0.1 ) ,
123120 backgroundColor : theme . palette . secondary . dark ,
124121 } ,
@@ -150,14 +147,14 @@ export const styles = theme => {
150147 } ,
151148 } ,
152149 /* Styles applied to the deleteIcon element if `color="primary"`. */
153- deleteIconPrimary : {
150+ deleteIconColorPrimary : {
154151 color : fade ( theme . palette . primary . contrastText , 0.65 ) ,
155152 '&:hover, &:active' : {
156153 color : theme . palette . primary . contrastText ,
157154 } ,
158155 } ,
159156 /* Styles applied to the deleteIcon element if `color="secondary"`. */
160- deleteIconSecondary : {
157+ deleteIconColorSecondary : {
161158 color : fade ( theme . palette . primary . contrastText , 0.65 ) ,
162159 '&:hover, &:active' : {
163160 color : theme . palette . primary . contrastText ,
@@ -214,13 +211,13 @@ class Chip extends React.Component {
214211 classes,
215212 className : classNameProp ,
216213 clickable,
214+ color,
217215 component : Component ,
218216 deleteIcon : deleteIconProp ,
219217 label,
220218 onClick,
221219 onDelete,
222220 onKeyDown,
223- color,
224221 tabIndex : tabIndexProp ,
225222 ...other
226223 } = this . props ;
@@ -229,9 +226,9 @@ class Chip extends React.Component {
229226 classes . root ,
230227 { [ classes [ `color${ capitalize ( color ) } ` ] ] : color !== 'default' } ,
231228 { [ classes . clickable ] : onClick || clickable } ,
232- { [ classes [ `clickable ${ capitalize ( color ) } ` ] ] : ( onClick || clickable ) && color !== 'default' } ,
229+ { [ classes [ `clickableColor ${ capitalize ( color ) } ` ] ] : ( onClick || clickable ) && color !== 'default' } ,
233230 { [ classes . deletable ] : onDelete } ,
234- { [ classes [ `deletable ${ capitalize ( color ) } ` ] ] : onDelete && color !== 'default' } ,
231+ { [ classes [ `deletableColor ${ capitalize ( color ) } ` ] ] : onDelete && color !== 'default' } ,
235232 classNameProp ,
236233 ) ;
237234
@@ -241,14 +238,14 @@ class Chip extends React.Component {
241238 deleteIconProp && React . isValidElement ( deleteIconProp ) ? (
242239 React . cloneElement ( deleteIconProp , {
243240 className : classNames ( deleteIconProp . props . className , classes . deleteIcon , {
244- [ classes [ `deleteIcon ${ capitalize ( color ) } ` ] ] : color !== 'default' ,
241+ [ classes [ `deleteIconColor ${ capitalize ( color ) } ` ] ] : color !== 'default' ,
245242 } ) ,
246243 onClick : this . handleDeleteIconClick ,
247244 } )
248245 ) : (
249246 < CancelIcon
250247 className = { classNames ( classes . deleteIcon , {
251- [ classes [ `deleteIcon ${ capitalize ( color ) } ` ] ] : color !== 'default' ,
248+ [ classes [ `deleteIconColor ${ capitalize ( color ) } ` ] ] : color !== 'default' ,
252249 } ) }
253250 onClick = { this . handleDeleteIconClick }
254251 />
@@ -259,7 +256,7 @@ class Chip extends React.Component {
259256 if ( avatarProp && React . isValidElement ( avatarProp ) ) {
260257 avatar = React . cloneElement ( avatarProp , {
261258 className : classNames ( classes . avatar , avatarProp . props . className , {
262- [ classes [ `avatar ${ capitalize ( color ) } ` ] ] : color !== 'default' ,
259+ [ classes [ `avatarColor ${ capitalize ( color ) } ` ] ] : color !== 'default' ,
263260 } ) ,
264261 childrenClassName : classNames ( classes . avatarChildren , avatarProp . props . childrenClassName ) ,
265262 } ) ;
0 commit comments