Last active
October 26, 2020 20:09
-
-
Save vansika/7feebaba8d2b786f7969620e0b30e16f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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