2019-03-26 05:38:57 +01:00
|
|
|
/**
|
|
|
|
* Text (p Element) with Tooltip
|
|
|
|
*/
|
2021-09-05 01:09:30 +02:00
|
|
|
import * as React from "react";
|
2019-03-26 05:38:57 +01:00
|
|
|
|
|
|
|
export interface IParagraphWithTooltipProps {
|
2021-09-05 01:09:30 +02:00
|
|
|
style?: any;
|
|
|
|
content: JSX.Element;
|
|
|
|
tooltip: string | React.ReactElement | JSX.Element;
|
2019-03-26 05:38:57 +01:00
|
|
|
}
|
|
|
|
|
2021-09-09 05:47:34 +02:00
|
|
|
export class ParagraphWithTooltip extends React.Component<IParagraphWithTooltipProps, any> {
|
2021-09-05 01:09:30 +02:00
|
|
|
render(): React.ReactNode {
|
|
|
|
return (
|
|
|
|
<div className={"tooltip"} style={this.props.style}>
|
|
|
|
<p>{this.props.content}</p>
|
|
|
|
<span className={"tooltiptext"}>{this.props.tooltip}</span>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2019-03-26 05:38:57 +01:00
|
|
|
}
|