import * as React from "react"; export interface TooltipProps { text: string; show: boolean; } export interface TooltipState { } class TooltipComponent extends React.Component { constructor(props: TooltipProps) { super(props); } render(): React.ReactElement { const style: React.CSSProperties = { display: this.props.show ? "flex" : "none", position: "absolute", } return ( {this.props.text} ); } } export default TooltipComponent;