bitburner-src/src/ui/React/ParagraphWithTooltip.tsx

24 lines
570 B
TypeScript
Raw Normal View History

/**
* Text (p Element) with Tooltip
*/
import * as React from "react";
export interface IParagraphWithTooltipProps {
style?: object;
content: JSX.Element;
tooltip: string;
}
export class ParagraphWithTooltip extends React.Component<IParagraphWithTooltipProps, any> {
render() {
return (
2019-04-14 11:08:10 +02:00
<p className={"tooltip"} style={this.props.style}>
{this.props.content}
<span className={"tooltiptext"}>
{this.props.tooltip}
</span>
</p>
)
}
}