Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. const ButtonArrows = ({leftArrow, rightArrow, ...props})
  2. const prevButton = (
  3. <Button
  4. aria-label="Previous",
  5. icon={leftArrow}
  6. />
  7. );
  8.  
  9. const nextButton = React.cloneElement(prevButton, {
  10. //this is where the problem is:
  11. aria-label="Next",
  12. icon={rightArrow}
  13. });
  14.  
  15. return(<div {...props}>{prevButton}{nextButton}</div>);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement