Skip to content

Instantly share code, notes, and snippets.

@karenying
Created June 16, 2020 01:07
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 karenying/d3f932b9d433a8ed61bf58838d168b7b to your computer and use it in GitHub Desktop.
Save karenying/d3f932b9d433a8ed61bf58838d168b7b to your computer and use it in GitHub Desktop.
import { FaChevronLeft, FaChevronRight } from 'react-icons/fa';
function Arrow(props) {
const { direction, clickFunction } = props;
const icon = direction === 'left' ? <FaChevronLeft /> : <FaChevronRight />;
return <div onClick={clickFunction}>{icon}</div>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment