aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/help_tooltip.tsx
blob: 003b795ef049ad0652c8a8b529878fde705e7c48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import * as React from 'react';
import ReactTooltip = require('react-tooltip');

interface HelpTooltipProps {
    style?: React.CSSProperties;
    explanation: React.ReactNode;
}

export const HelpTooltip = (props: HelpTooltipProps) => {
    return (
        <div
            style={{...props.style}}
            className="inline-block"
            data-tip={props.explanation}
            data-for="helpTooltip"
            data-multiline={true}
        >
            <i style={{fontSize: 16}} className="zmdi zmdi-help" />
            <ReactTooltip id="helpTooltip" />
        </div>
    );
};