@pedalboard/components
v0.6.25
Published
A set of well-crafted components
Downloads
353
Readme
@pedalboard/components
A set of well-crafted React components.
Installation
pnpm
pnpm add @pedalboard/componentsnpm
npm install @pedalboard/componentsPeer Dependencies
This package requires the following peer dependencies:
react^17.0.2react-dom^17.0.2prop-types^15.8.0
Components
Pagination
A pagination component that provides navigation controls for paginated content.
Props
| Prop | Type | Description |
|------|------|-------------|
| totalPages | number | Total number of pages |
| initialCursor | number | Initial page index (0-based) |
| pagesBuffer | number | Number of page indicators to display |
| onChange | () => void | Callback fired when page changes |
Usage
import {Pagination} from '@pedalboard/components';
function MyComponent() {
const handlePageChange = () => {
console.log('Page changed');
};
return (
<Pagination
totalPages={10}
initialCursor={0}
pagesBuffer={5}
onChange={handlePageChange}
/>
);
}Storybook
This package includes a Storybook for component documentation and visual testing. To run it locally:
cd packages/components
pnpm run storybookResources
License
MIT
