- node >=10
yarn install moyi-components
# OR
npm install moyi-components
import { MyPagination } from 'moyi-components';
ReactDOM.render(<MyPagination />, container);
Parameter | Description | Type | Default |
---|---|---|---|
current | current page | Number | 1 |
pageSize | items per page | Number | 10 |
total | items total count | Number | 0 |
onChange | page change callback | Function(current, pageSize) | - |
showTotal | show total records and range | Function(total, [from, to]) | - |
style | the style of pagination | Object | {} |
prevIcon | specifict the default previous icon | ReactNode |(props: PaginationProps) => ReactNode | |
nextIcon | specifict the default next icon | ReactNode |(props: PaginationProps) => ReactNode |
yarn run test
👤 moyiwpb