Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cloudflare/component-pagination

Package Overview
Dependencies
Maintainers
31
Versions
675
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/component-pagination

Cloudflare Pagination Component

  • 9.0.24
  • npm
  • Socket score

Version published
Weekly downloads
8.3K
decreased by-14.01%
Maintainers
31
Weekly downloads
 
Created
Source

@cloudflare/component-pagination

Cloudflare Pagination Component

Installation

Installation with yarn is recommended


$ yarn add @cloudflare/component-pagination

Usage

import React from 'react';
import { createComponent } from '@cloudflare/style-container';
import { Pagination } from '../../src';

const Margin = createComponent(({ theme }) => ({
  margin: theme.space[2]
}));

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>
        <Margin>
          <Pagination
            start={1}
            end={15}
            total={15}
            disablePreviousButton={true}
            disableNextButton={true}
            onPrevClick={onPrevClick}
            onNextClick={onNextClick}
          />
        </Margin>
      </div>
    );
  }
}

export default PaginationComponent;

FAQs

Package last updated on 04 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc