Created
June 16, 2020 01:07
-
-
Save karenying/d3f932b9d433a8ed61bf58838d168b7b 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
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