Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: minor map tooltip refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera committed Oct 25, 2019
1 parent ac49981 commit 9c401e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 73 deletions.
21 changes: 3 additions & 18 deletions src/v2/components/UI/MapTooltip/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,12 @@ import {Tooltip} from '@material-ui/core';
import {TooltipProps} from '@material-ui/core/Tooltip';
import React from 'react';

import useStyles from './styles';

type MapTooltipProps = {
title: string,
};

const MapTooltip = ({title, ...rest}: MapTooltipProps & TooltipProps) => {
const {arrow, ...classes} = useStyles();

return (
<Tooltip
classes={{...classes, ...rest.classes}}
{...rest}
title={
<>
{title()}
<span className={arrow} />
</>
}
/>
);
};
const MapTooltip = ({title, ...rest}: MapTooltipProps & TooltipProps) => (
<Tooltip classes={{...rest.classes}} {...rest} title={title()} />
);

export default MapTooltip;
55 changes: 0 additions & 55 deletions src/v2/components/UI/MapTooltip/styles.js

This file was deleted.

0 comments on commit 9c401e6

Please sign in to comment.