You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
431 B

import React from 'react';
5 years ago
const PrevAndNext = ({ prev, next }) => (
<section className="prev-next-nav">
{prev
? React.cloneElement(prev.props.children || prev.children[0], {
className: 'prev-page',
})
: null}
{next
? React.cloneElement(next.props.children || next.children[0], {
className: 'next-page',
})
: null}
</section>
);
5 years ago
export default PrevAndNext;