This package has been deprecated

Author message:

This package has been deprecated. Please find this package under its new name @cloudflare/component-pagination.

cf-component-pagination

7.0.0 • Public • Published

cf-component-pagination

Cloudflare Pagination Component

Installation

Installation with yarn is recommended

 
$ yarn add cf-component-pagination
 

Usage

import React from 'react';
import { createComponent } from 'cf-style-container';
import { Pagination } from 'cf-component-pagination';
 
const Margin = createComponent(({ theme }) => ({
  margin: theme.space[2]
}));
Margin.setDisplayName('Margin');
 
const onPrevClick = () => console.log('prev click!');
const onNextClick = () => console.log('next click!');
 
class PaginationComponent extends React.Component {
  render() {
    return (
      <div>
        <Margin>
          <Pagination
            start={1}
            end={15}
            total={60}
            onPrevClick={onPrevClick}
            onNextClick={onNextClick}
          />
        </Margin>
        <Margin>
          <Pagination
            start={45}
            end={60}
            total={60}
            onPrevClick={onPrevClick}
            onNextClick={onNextClick}
          />
        </Margin>
        <Margin>
          <Pagination
            start={45}
            end={60}
            onPrevClick={onPrevClick}
            onNextClick={onNextClick}
          />
        </Margin>
        <Margin>
          <Pagination
            start={1}
            end={15}
            total={60}
            onPrevClick={onPrevClick}
            onNextClick={onNextClick}
            loading
          />
        </Margin>
      </div>
    );
  }
}
 
export default PaginationComponent;
 

Readme

Keywords

none

Package Sidebar

Install

npm i cf-component-pagination

Weekly Downloads

3

Version

7.0.0

License

BSD-3-Clause

Unpacked Size

28.9 kB

Total Files

13

Last publish

Collaborators

  • lbarthonet
  • cf-media-manager
  • jacobbednarz
  • celso
  • cf-radar
  • dash_service_account
  • g4brym
  • snigdha34
  • wrangler-publisher
  • marksteyn
  • chiminator
  • sgoodhew_cf
  • terinjokes
  • third774
  • jsteinberger
  • jasnell
  • asapzacy
  • pcostanzo
  • gregbrimble
  • geelen
  • rexscaria
  • dcruz_cf
  • xuranwang
  • jculvey
  • sejoker
  • vasturiano
  • cf-ci-write
  • segments-write
  • thibmeu
  • xortive
  • gurjinder
  • cf-ci2
  • lvalenta
  • worenga