We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b0ffcb commit d520dbcCopy full SHA for d520dbc
src/lib/components/Button/Button.js
@@ -46,12 +46,10 @@ const Button = forwardRef(
46
return (
47
<button {...restProps} className={buttonClassName} ref={ref} data-testid={id}>
48
{icon && iconPosition === 'left' && icon}
49
- {tooltip ? (
50
- <Tooltip template={<TextTooltipTemplate text={tooltip} />}>
+ {(tooltip || label) && (
+ <Tooltip template={<TextTooltipTemplate text={tooltip || label} />}>
51
{label && <span>{label}</span>}
52
</Tooltip>
53
- ) : (
54
- label && <span>{label}</span>
55
)}
56
{icon && iconPosition === 'right' && icon}
57
</button>
0 commit comments