mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
28 lines
614 B
JavaScript
28 lines
614 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} position="top" className={className} message={children}>
|
|
<i className={'fa ' + (info ? 'fa-info-circle' : 'fa-question-circle')}/>
|
|
</Tooltip>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default HelpTooltip;
|