Skip to content

Commit

Permalink
[material-ui][Tooltip] Warn instead of error when trigger is disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
yash49 authored Dec 24, 2024
1 parent cf7bbc1 commit 3570a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mui-material/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const Tooltip = React.forwardRef(function Tooltip(inProps, ref) {
title !== '' &&
childNode.tagName.toLowerCase() === 'button'
) {
console.error(
console.warn(
[
'MUI: You are providing a disabled `button` child to the Tooltip component.',
'A disabled element does not fire events.',
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Tooltip/Tooltip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ describe('<Tooltip />', () => {
</button>
</Tooltip>,
);
}).toErrorDev('MUI: You are providing a disabled `button` child to the Tooltip component');
}).toWarnDev('MUI: You are providing a disabled `button` child to the Tooltip component');
});

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

0 comments on commit 3570a80

Please sign in to comment.