wordpress-activitypub/src/followers/pagination-page.js
Matt Wiebe 5b9dadd6fd
Followers Block (#344)
Introduces a new Followers block. Proudly display your Fediverse followers to the world!

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-07-26 15:05:41 -05:00

18 lines
No EOL
409 B
JavaScript

import classNames from 'classnames';
export function PaginationPage( { active, children, page, pageClick, className } ) {
const handleClick = event => {
event.preventDefault();
! active && pageClick( page );
};
const classes = classNames( 'wp-block activitypub-pager', className , {
'current': active,
} );
return (
<a className={ classes }onClick={ handleClick }>
{ children }
</a>
);
}