Skip to content

Commit d4e75b3

Browse files
committed
tooltip - downgrade disabled error to warning
1 parent c3f3642 commit d4e75b3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/mui-material/src/Tooltip/Tooltip.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ const Tooltip = React.forwardRef(function Tooltip(inProps, ref) {
386386
title !== '' &&
387387
childNode.tagName.toLowerCase() === 'button'
388388
) {
389-
console.error(
389+
console.warn(
390390
[
391391
'MUI: You are providing a disabled `button` child to the Tooltip component.',
392392
'A disabled element does not fire events.',

packages/mui-material/src/Tooltip/Tooltip.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ describe('<Tooltip />', () => {
706706
</button>
707707
</Tooltip>,
708708
);
709-
}).toErrorDev('MUI: You are providing a disabled `button` child to the Tooltip component');
709+
}).toWarnDev('MUI: You are providing a disabled `button` child to the Tooltip component');
710710
});
711711

712712
it('should not raise a warning when we are controlled', () => {

0 commit comments

Comments
 (0)