Skip to content

Commit 56a68f1

Browse files
committed
run yarn prettier
1 parent b04c6f6 commit 56a68f1

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,10 @@ const Tooltip = React.forwardRef(function Tooltip(props, ref) {
280280
}
281281
};
282282

283-
const handleEnter = (forward = true) => event => {
283+
const handleEnter = (forward = true) => (event) => {
284284
const childrenProps = children.props;
285285

286-
if (
287-
event.type === 'mouseover' &&
288-
childrenProps.onMouseOver &&
289-
forward
290-
) {
286+
if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {
291287
childrenProps.onMouseOver(event);
292288
}
293289

@@ -326,7 +322,7 @@ const Tooltip = React.forwardRef(function Tooltip(props, ref) {
326322
}
327323
};
328324

329-
const handleFocus = (forward = true) => event => {
325+
const handleFocus = (forward = true) => (event) => {
330326
// Workaround for https://github.com/facebook/react/issues/7769
331327
// The autoFocus of React might trigger the event before the componentDidMount.
332328
// We need to account for this eventuality.
@@ -362,7 +358,7 @@ const Tooltip = React.forwardRef(function Tooltip(props, ref) {
362358
}, theme.transitions.duration.shortest);
363359
};
364360

365-
const handleLeave = (forward = true) => event => {
361+
const handleLeave = (forward = true) => (event) => {
366362
const childrenProps = children.props;
367363

368364
if (event.type === 'blur') {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ describe('<Tooltip />', () => {
484484

485485
// https://github.com/mui-org/material-ui/issues/19883
486486
it('should not prevent event handlers of children', () => {
487-
const handleFocus = spy(event => event.currentTarget);
487+
const handleFocus = spy((event) => event.currentTarget);
488488
// Tooltip should not assume that event handlers of children are attached to the
489489
// outermost host
490490
const TextField = React.forwardRef(function TextField(props, ref) {

0 commit comments

Comments
 (0)