mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
History pagination (#58)
Adds pagination for the history page. fixes #32
This commit is contained in:
parent
70ab02431c
commit
11f01094b4
7 changed files with 185 additions and 37 deletions
17
src/components/pagination/pager-item.tsx
Normal file
17
src/components/pagination/pager-item.tsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
import React from "react";
|
||||
|
||||
export interface PageItemProps {
|
||||
onClick: (index: number) => void
|
||||
index: number
|
||||
}
|
||||
|
||||
|
||||
export const PagerItem: React.FC<PageItemProps> = ({index, onClick}) => {
|
||||
return (
|
||||
<li className="page-item">
|
||||
<span className="page-link" role="button" onClick={() => onClick(index)}>
|
||||
{index + 1}
|
||||
</span>
|
||||
</li>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue