Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Answer = (props) => {
- const {
- yesLabel,
- noLabel,
- onClickYes,
- onClickNo,
- } = this.props;
- return (
- <div className={styles.container}>
- <div className={styles.buttonContainerLeft}>
- <Button color="white" onClick={onClickYes}>
- {yesLabel}
- </Button>
- </div>
- <div className={styles.buttonContainer}>
- <Button color="white" onClick={onClickNo}>
- {noLabel}
- </Button>
- </div>
- </div>
- );
- }
- Answer.propTypes = {
- yesLabel: React.PropTypes.string.isRequired,
- noLabel: React.PropTypes.string.isRequired,
- onClickYes: React.PropTypes.func,
- onClickNo: React.PropTypes.func,
- }
- Answer.defaultProps = {
- yesLabel: 'Yes',
- noLabel: 'No',
- onClickYes: null,
- onClickNo: null,
- }
- export default Answer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement