Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Created July 29, 2018 05:40
Show Gist options
  • Save DZuz14/c414a039363e34e7981ed9bbea23d476 to your computer and use it in GitHub Desktop.
Save DZuz14/c414a039363e34e7981ed9bbea23d476 to your computer and use it in GitHub Desktop.
Arrows With Props
import React from 'react';
const RightArrow = (props) => {
return (
<div className="nextArrow" onClick={props.goToNextSlide}>
<i className="fa fa-arrow-right fa-2x" aria-hidden="true"></i>
</div>
);
}
export default RightArrow;
/*
Pretend these are in their own separate files
*/
import React from 'react';
const LeftArrow = (props) => {
return (
<div className="backArrow" onClick={props.goToPrevSlide}>
<i className="fa fa-arrow-left fa-2x" aria-hidden="true"></i>
</div>
);
}
export default LeftArrow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment