@@ -56,7 +56,7 @@ const generateStyle = (
5656 isCondensed
5757 } = props
5858
59- const { isDisabled, hasOnlyIconVisible } = state
59+ const { isDisabled, hasOnlyIconVisible, isEnabled } = state
6060
6161 const shapeVariants = {
6262 circle : { borderRadius : '50%' } ,
@@ -401,26 +401,32 @@ const generateStyle = (
401401 }
402402
403403 return {
404- baseButton : {
405- label : 'baseButton' ,
406- appearance : 'none' ,
407- textDecoration : 'none' /* for links styled as buttons */ ,
408- touchAction : 'manipulation' ,
409-
410- '&::-moz-focus-inner' : {
411- border : '0' /* removes default dotted focus outline in Firefox */
412- } ,
413- '*' : {
414- pointerEvents :
415- 'none' /* Ensures that button or link is always the event target */
416- } ,
417- '&:focus' : {
418- textDecoration : 'none'
419- } ,
420- '&:active > [class$=-baseButton__content]' : colorVariants [ color ! ] . active ,
421- '&:hover > [class$=-baseButton__content]' : colorVariants [ color ! ] . hover
422- } ,
404+ baseButton : isEnabled
405+ ? {
406+ label : 'baseButton' ,
407+ appearance : 'none' ,
408+ textDecoration : 'none' /* for links styled as buttons */ ,
409+ touchAction : 'manipulation' ,
423410
411+ '&::-moz-focus-inner' : {
412+ border : '0' /* removes default dotted focus outline in Firefox */
413+ } ,
414+ '*' : {
415+ pointerEvents :
416+ 'none' /* Ensures that button or link is always the event target */
417+ } ,
418+ '&:focus' : {
419+ textDecoration : 'none'
420+ } ,
421+ '&:active > [class$=-baseButton__content]' :
422+ colorVariants [ color ! ] . active ,
423+ '&:hover > [class$=-baseButton__content]' : colorVariants [ color ! ] . hover
424+ }
425+ : {
426+ textDecoration : 'none' ,
427+ label : 'baseButton' ,
428+ appearance : 'none'
429+ } ,
424430 content : {
425431 label : 'baseButton__content' ,
426432 boxSizing : 'border-box' ,
0 commit comments