mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-10-24 02:33:16 +02:00
24 lines
534 B
TypeScript
24 lines
534 B
TypeScript
/**
|
|
* Text (p Element) with Tooltip
|
|
*/
|
|
import * as React from "react";
|
|
|
|
export interface IParagraphWithTooltipProps {
|
|
style?: object;
|
|
text: string;
|
|
tooltip: string;
|
|
}
|
|
|
|
export class ParagraphWithTooltip extends React.Component<IParagraphWithTooltipProps, any> {
|
|
render() {
|
|
return (
|
|
<p className={"tooltip"}>
|
|
{this.props.text}
|
|
<span className={"tooltiptext"}>
|
|
{this.props.tooltip}
|
|
</span>
|
|
</p>
|
|
)
|
|
}
|
|
}
|