2019-04-14 11:08:10 +02:00
|
|
|
/**
|
|
|
|
* React component for a selectable option on the Faction UI. These
|
|
|
|
* options including working for the faction, hacking missions, purchasing
|
|
|
|
* augmentations, etc.
|
|
|
|
*/
|
|
|
|
import * as React from "react";
|
|
|
|
|
|
|
|
import { StdButton } from "../../ui/React/StdButton";
|
|
|
|
|
|
|
|
type IProps = {
|
2021-09-05 01:09:30 +02:00
|
|
|
buttonText: string;
|
|
|
|
infoText: string;
|
|
|
|
onClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
|
|
};
|
2019-04-14 11:08:10 +02:00
|
|
|
|
|
|
|
export class Option extends React.Component<IProps, any> {
|
2021-09-05 01:09:30 +02:00
|
|
|
render(): React.ReactNode {
|
|
|
|
return (
|
|
|
|
<div className={"faction-work-div"}>
|
|
|
|
<div className={"faction-work-div-wrapper"}>
|
2021-09-09 05:47:34 +02:00
|
|
|
<StdButton onClick={this.props.onClick} text={this.props.buttonText} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<p>{this.props.infoText}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2019-04-14 11:08:10 +02:00
|
|
|
}
|