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