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 "./PreviousPages.scss";
- const PreviousPages = ({ totalPages, page, ...other }) => (
- <div className={styles["guc-previous-pages"]}>
- { (totalPages > 1 && page > 1)
- ? <React.Fragment>
- <Page {...other} label="<<" page={1} />
- <Page {...other} label="<" page={page - 1} />
- </React.Fragment>
- : null}
- </div>
- );
- PreviousPages.propTypes = {
- totalPages: PropTypes.number,
- page: PropTypes.number
- };
- export default PreviousPages;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement