Skip to content

Instantly share code, notes, and snippets.

@vansika
Last active October 26, 2020 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vansika/7feebaba8d2b786f7969620e0b30e16f to your computer and use it in GitHub Desktop.
Save vansika/7feebaba8d2b786f7969620e0b30e16f to your computer and use it in GitHub Desktop.
<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