Skip to content

Commit

Permalink
Actually add the tooltip. Oops.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceau committed Nov 29, 2020
1 parent f65d064 commit 5fa637f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions app/components/common/Tooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';

import PropTypes from 'prop-types';
import { Popup } from 'semantic-ui-react';

export default class Tooltip extends Component {
static propTypes = {
children: PropTypes.any.isRequired,
title: PropTypes.string.isRequired,
};

render() {
const { title, children, ...rest } = this.props;
return (
<Popup
size="mini"
position="top center"
content={title}
inverted={true}
trigger={children}
{...rest}
/>
);
}
}

0 comments on commit 5fa637f

Please sign in to comment.