
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@idui/react-pagination
Advanced tools
npm install --save @idui/react-pagination
yarn add @idui/react-pagination
import React from 'react'
import styled, { css } from 'styled-components';
import { ifProp } from 'styled-tools';
import Pagination from '@idui/react-pagination'
export function CustomPaginationWithPageNumbers(props) {
const [page, setPage] = useState(1);
return (
<Container>
<Pagination
currentPage={page}
onChangePage={setPage}
pagesCount={10}
visiblePagesCount={3}
renderLeftControl={(props) => <Control {...props}>â</Control>}
renderRightControl={(props) => <Control {...props}>â</Control>}
renderPage={({ number, ...props }) => <Page {...props}>{number}</Page>}
pageGroupsDivider={<Divider>...</Divider>}
/>
</Container>
);
}
const Container = styled.div`
display: flex;
align-items: center;
justify-content: center;
`;
const Page = styled.span`
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
line-height: 1.4rem;
width: 2rem;
height: 2rem;
border-radius: 50%;
cursor: pointer;
&:not(:last-child) {
margin-right: 0.35rem;
}
${ifProp(
'isActive',
css`
color: #ffffff;
background-color: #0d4c0e;
`,
css`
color: #666666;
&:hover {
color: #000000;
}
`
)}
`;
const Control = styled.span`
font-size: 1.4rem;
cursor: pointer;
&:first-child {
margin-right: 1rem;
transform: scaleY(-1) rotate(-180deg);
}
&:last-child {
margin-left: 1rem;
}
`;
const Divider = styled.span`
margin: 0 0.5rem;
`;
import React from 'react'
import styled from 'styled-components';
import { ifProp } from 'styled-tools';
import Pagination from '@idui/react-pagination'
export function CustomPaginationWithPageNumbers(props) {
const [page, setPage] = useState(1);
return (
<Container>
<Pagination
currentPage={page}
onChangePage={setPage}
pagesCount={5}
visiblePagesCount={0}
renderPage={(props) => <Page {...props} />}
/>
</Container>
);
}
const Container = styled.div`
display: flex;
align-items: center;
justify-content: center;
`;
const Page = styled.span`
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
line-height: 1.4rem;
width: 2rem;
height: 2rem;
border-radius: 50%;
cursor: pointer;
&:not(:last-child) {
margin-right: 0.35rem;
}
background-color: ${ifProp('isActive', '#0d4c0e', '#507350')};
`;
MIT Š kaprisa57@gmail.com
FAQs
React Pagination Component
We found that @idui/react-pagination demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: whatâs affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.