Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const ButtonArrows = ({leftArrow, rightArrow, ...props})
- const prevButton = (
- <Button
- aria-label="Previous",
- icon={leftArrow}
- />
- );
- const nextButton = React.cloneElement(prevButton, {
- //this is where the problem is:
- aria-label="Next",
- icon={rightArrow}
- });
- return(<div {...props}>{prevButton}{nextButton}</div>);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement