Skip to content

Commit

Permalink
fix(core/button): prevent interaction of ix-icon (#839)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Maurer <lukas.maurer@siemens.com>
  • Loading branch information
danielleroux and nuke-ellington committed Oct 12, 2023
1 parent 87622f4 commit a0bd2af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/components/button/base-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function BaseButton(props: BaseButtonProps, children) {
{props.loading ? <ix-spinner size="small" hideTrack></ix-spinner> : null}
{props.icon && !props.loading ? (
<ix-icon
class="icon"
name={props.icon}
size={props.iconSize as any}
color={props.iconColor}
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/components/button/button-mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
.content-start {
width: 100%;
}

.icon {
// Prevents icon to show title tooltip
// if embedded in ix-icon-button or ix-button[icon]
pointer-events: none;
}
}

:host(.disabled) {
Expand Down

0 comments on commit a0bd2af

Please sign in to comment.