woocommerce/plugins/woocommerce-admin/client/components/pagination/example.md

355 B

import { Pagination } from '@woocommerce/components';

const MyPagination = withState( {
	page: 2,
	perPage: 50,
} )( ( { page, perPage, setState } ) => (
	<Pagination
		page={ page }
		perPage={ perPage }
		total={ 500 }
		onPageChange={ ( page ) => setState( { page } ) }
		onPerPageChange={ ( perPage ) => setState( { perPage } ) }
	/>
) );