We've created this special component due to the fact that you would have needed to write a lot of code to obtain a small component. So, it was done to make your life easier.
You will find the styles for this component in
src/assets/jss/nextjs-material-kit/components/paginationStyle.js
.
import React from 'react';
import Paginations from "/components/Pagination/Pagination.js";
export default function Example(){
return (
<Paginations
pages={[
{ text: "PREV" },
{ text: 1 },
{ text: 2 },
{ active: true, text: 3 },
{ text: 4 },
{ text: 5 },
{ text: "NEXT" }
]}
color="info"
/>
);
}
Pagination.defaultProps = {
color: "primary"
};
Pagination.propTypes = {
pages: PropTypes.arrayOf(
PropTypes.shape({
active: PropTypes.bool,
disabled: PropTypes.bool,
text: PropTypes.oneOfType([
PropTypes.number,
PropTypes.oneOf(["PREV", "NEXT", "..."])
]).isRequired,
onClick: PropTypes.func
})
).isRequired,
color: PropTypes.oneOf(["primary", "info", "success", "warning", "danger"])
};