diff options
Diffstat (limited to 'src/components/NoticeTextSectionComponent.tsx')
-rw-r--r-- | src/components/NoticeTextSectionComponent.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/NoticeTextSectionComponent.tsx b/src/components/NoticeTextSectionComponent.tsx index 839d7448..faed5704 100644 --- a/src/components/NoticeTextSectionComponent.tsx +++ b/src/components/NoticeTextSectionComponent.tsx @@ -2,7 +2,8 @@ import * as React from "react"; export interface NoticeTextSelectionProps { text: string, - idSuffix: string + idSuffix: string, + onClick?: (event: React.MouseEvent) => any } export interface NoticeTextSelectionState { @@ -16,8 +17,16 @@ class NoticeTextSelectionComponent extends React.Component<NoticeTextSelectionPr } render() { + let style: React.CSSProperties = {}; + if (this.props.onClick) { + style.cursor = "pointer"; + style.textDecoration = "underline" + } + return ( <p id={"sponsorTimesInfoMessage" + this.props.idSuffix} + onClick={this.props.onClick} + style={style} className="sponsorTimesInfoMessage"> {this.props.text} </p> |