diff --git a/packages/react/src/components/Button/Button.js b/packages/react/src/components/Button/Button.js index 7df8969c77d4..368a182bf6d4 100644 --- a/packages/react/src/components/Button/Button.js +++ b/packages/react/src/components/Button/Button.js @@ -141,17 +141,16 @@ const Button = React.forwardRef(function Button( [`${prefix}--btn--${kind}`]: kind, [`${prefix}--btn--disabled`]: disabled, [`${prefix}--btn--expressive`]: isExpressive, - [`${prefix}--tooltip--visible`]: !enabled && isHovered, - [`${prefix}--tooltip--hidden`]: - !enabled && hasIconOnly && !allowTooltipVisibility, + [`${prefix}--tooltip--visible`]: isHovered, + [`${prefix}--tooltip--hidden`]: hasIconOnly && !allowTooltipVisibility, [`${prefix}--btn--icon-only`]: hasIconOnly, [`${prefix}--btn--selected`]: hasIconOnly && isSelected && kind === 'ghost', - [`${prefix}--tooltip__trigger`]: !enabled && hasIconOnly, - [`${prefix}--tooltip--a11y`]: !enabled && hasIconOnly, + [`${prefix}--tooltip__trigger`]: hasIconOnly, + [`${prefix}--tooltip--a11y`]: hasIconOnly, [`${prefix}--btn--icon-only--${tooltipPosition}`]: - !enabled && hasIconOnly && tooltipPosition, + hasIconOnly && tooltipPosition, [`${prefix}--tooltip--align-${tooltipAlignment}`]: - !enabled && hasIconOnly && tooltipAlignment, + hasIconOnly && tooltipAlignment, }); const commonProps = { @@ -215,26 +214,6 @@ const Button = React.forwardRef(function Button( otherProps = anchorProps; } - if (enabled) { - delete otherProps['aria-describedby']; - - return React.createElement( - component, - { - onMouseEnter, - onMouseLeave, - onFocus, - onBlur, - onClick, - type, - ...other, - ...commonProps, - ...otherProps, - }, - children - ); - } - return React.createElement( component, { diff --git a/packages/styles/scss/components/ui-shell/header/_header.scss b/packages/styles/scss/components/ui-shell/header/_header.scss index b88dcda6f355..7ab0fca958ef 100644 --- a/packages/styles/scss/components/ui-shell/header/_header.scss +++ b/packages/styles/scss/components/ui-shell/header/_header.scss @@ -36,6 +36,7 @@ .#{$prefix}--header__action { @include button-reset.reset(); + display: inline-flex; width: mini-units(6); height: mini-units(6); border: rem(2px) solid transparent; @@ -80,6 +81,7 @@ } .#{$prefix}--header__action.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger { + align-items: center; justify-content: center; }