insomnia/app/ui/components/help-tooltip.js
Gregory Schier d3ce502c13 Load plugin from NPM (#371)
* Install plugins from npm

* A bit more

* Error handling and messaging
2017-07-21 17:55:34 -07:00

28 lines
599 B
JavaScript

// @flow
import React from 'react';
import autobind from 'autobind-decorator';
import Tooltip from './tooltip';
@autobind
class HelpTooltip extends React.PureComponent {
props: {
children: React.Children,
// Optional
position?: string,
className?: string,
info?: boolean
};
render () {
const {children, className, info, ...props} = this.props;
return (
<Tooltip {...props} className={className} message={children}>
<i className={'fa ' + (info ? 'fa-info-circle' : 'fa-question-circle')}/>
</Tooltip>
);
}
}
export default HelpTooltip;