
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@bolttech/molecules-pagination
Advanced tools
The **Pagination** component is a customizable React component that provides navigation between different pages of content.
The Pagination component is a customizable React component that provides navigation between different pages of content.
To use the Pagination component, you need to install the required dependencies:
npm install @bolttech/frontend-foundations @bolttech/molecules-pagination
or
yarn add @bolttech/frontend-foundations @bolttech/molecules-pagination
You can utilize the Pagination component by importing it and including it in your JSX. Here's an example:
import React, {useState} from 'react';
import {Pagination} from '@bolttech/molecules-pagination';
import {bolttechTheme, BolttechThemeProvider} from "@bolttech/frontend-foundations"; // Adjust the path to your component
function App() {
const [currentPage, setCurrentPage] = useState(1);
const handlePageChange = (newPage) => {
setCurrentPage(newPage);
};
return (
<BolttechThemeProvider theme={bolttechTheme}>
{/* Content */}
{/* Pagination component */}
<Pagination
current={currentPage}
pages={10}
onChange={handlePageChange}
texts={{
previous: 'Previous',
next: 'Next',
current: 'Page $current of $pages',
}}
/>
</BolttechThemeProvider>
);
}
export default App;
The Pagination component accepts the following props:
Prop | Type | Description |
---|---|---|
current | number | The current active page number. |
dataTestId | string | The data-testid attribute for testing purposes. |
id | string | The ID attribute for the component. |
onChange | function | Callback function triggered when page changes. |
pages | number | The total number of pages. |
texts | object | Object containing text labels for the pagination. |
The texts
prop is an object with the following properties:
previous
: Text for the previous page button.next
: Text for the next page button.current
: Text for displaying the current page and total pages. You can use $current
and $pages
placeholders in the text, which will be replaced with the actual values.The Pagination component provides the following functionality:
Contributions to the Pagination component are welcomed. If you encounter issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the component's Bitbucket repository.
FAQs
The **Pagination** component is a customizable React component that provides navigation between different pages of content.
The npm package @bolttech/molecules-pagination receives a total of 112 weekly downloads. As such, @bolttech/molecules-pagination popularity was classified as not popular.
We found that @bolttech/molecules-pagination demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.