Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import PropTypes from "prop-types";
- import React from "react";
- import Page from "../Page";
- import styles from "./NextPages.scss";
- const NextPages = ({ totalPages, page, ...other }) => (
- <div className={styles["guc-next-pages"]}>
- { (totalPages > 1 && page < totalPages)
- ? <React.Fragment>
- <Page {...other} label=">" page={page + 1} />
- <Page {...other} label=">>" page={totalPages} />
- </React.Fragment>
- : null}
- </div>
- );
- NextPages.propTypes = {
- totalPages: PropTypes.number,
- page: PropTypes.number
- };
- export default NextPages;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement