<div className="col-xs-1 text-center"> | |
<div className="recommendation-controls"> | |
<> | |
{this.handleFeedbackOnClick('Like', faThumbsUpRegular)} | |
<ul | |
className="dropdown-menu dropdown-menu-right" | |
aria-labelledby="recommendationControlsDropdown" | |
> | |
<RecommendationControl | |
icon={faAngry} | |
title="I never want to hear this again!" | |
action={(event: React.SyntheticEvent) => | |
feedback === "hate" | |
? this.deleteFeedback(event) | |
: this.submitFeedback(event, "hate") | |
} | |
className={`${feedback === "hate" ? " angry" : ""}`} | |
/> | |
handleFeedbackOnClick = (text, icon) => { | |
return ( | |
<button | |
className="btn" | |
id="recommendationControlsDropdown" | |
data-toggle="dropdown" | |
aria-haspopup="true" | |
aria-expanded="true" | |
background-color='white'><FontAwesomeIcon icon={icon as IconProp} /> {text} | |
</button> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment