Skip to content

Commit

Permalink
simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 13, 2019
1 parent d337bda commit f8c03f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
14 changes: 1 addition & 13 deletions docs/src/pages/components/tooltips/CustomizedTooltips.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import Tooltip from '@material-ui/core/Tooltip';
Expand All @@ -26,20 +25,9 @@ const useStylesBootstrap = makeStyles(theme => ({
function BootstrapTooltip(props) {
const classes = useStylesBootstrap();

return (
<Tooltip
arrow
classes={classes}
{...props}
title={<React.Fragment>{props.title}</React.Fragment>}
/>
);
return <Tooltip arrow classes={classes} {...props} />;
}

BootstrapTooltip.propTypes = {
title: PropTypes.node,
};

const HtmlTooltip = withStyles(theme => ({
tooltip: {
backgroundColor: '#f5f5f9',
Expand Down
9 changes: 1 addition & 8 deletions docs/src/pages/components/tooltips/CustomizedTooltips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ const useStylesBootstrap = makeStyles((theme: Theme) => ({
function BootstrapTooltip(props: TooltipProps) {
const classes = useStylesBootstrap();

return (
<Tooltip
arrow
classes={classes}
{...props}
title={<React.Fragment>{props.title}</React.Fragment>}
/>
);
return <Tooltip arrow classes={classes} {...props} />;
}

const HtmlTooltip = withStyles((theme: Theme) => ({
Expand Down

0 comments on commit f8c03f6

Please sign in to comment.