Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tooltip] Update error message #10742

Merged
merged 4 commits into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ class Tooltip extends React.Component {
!this.children.disabled ||
!this.children.tagName.toLowerCase() === 'button',
[
'Material-UI: you are providing a disabled button children to the Tooltip component.',
'A disabled element do not fire events.',
'But the Tooltip needs to listen to the children element events to display the title.',
'Material-UI: you are providing a disabled `button` child to the Tooltip component.',
'A disabled element does not fire events.',
"Tooltip needs to listen to the child element's events to display the title.",
'',
'Place a `div` over top of the element.',
'Place a `div` container on top of the element.',
].join('\n'),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tooltip/Tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ describe('<Tooltip />', () => {
assert.strictEqual(consoleErrorMock.callCount(), 1, 'should call console.error');
assert.match(
consoleErrorMock.args()[0][0],
/Material-UI: you are providing a disabled button children to the Tooltip component/,
/Material-UI: you are providing a disabled `button` child to the Tooltip component/,
);
});
});
Expand Down