mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
d3ce502c13
* Install plugins from npm * A bit more * Error handling and messaging
28 lines
599 B
JavaScript
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;
|