mirror of
https://github.com/zadam/trilium.git
synced 2026-02-26 16:43:36 +01:00
ui/pager: add support for custom CSS class
This commit is contained in:
parent
00046d4145
commit
8edf5483a6
@ -10,6 +10,7 @@ import "./Pagination.css";
|
||||
import clsx from "clsx";
|
||||
|
||||
interface PaginationContext {
|
||||
className?: string;
|
||||
page: number;
|
||||
setPage: Dispatch<StateUpdater<number>>;
|
||||
pageNotes?: FNote[];
|
||||
@ -18,11 +19,11 @@ interface PaginationContext {
|
||||
totalNotes: number;
|
||||
}
|
||||
|
||||
export function Pager({ page, pageSize, setPage, pageCount, totalNotes }: Omit<PaginationContext, "pageNotes">) {
|
||||
export function Pager({ className, page, pageSize, setPage, pageCount, totalNotes }: Omit<PaginationContext, "pageNotes">) {
|
||||
if (pageCount < 2) return;
|
||||
|
||||
return (
|
||||
<div className="note-list-pager-container">
|
||||
<div className={clsx("note-list-pager-container", className)}>
|
||||
<div className="note-list-pager">
|
||||
<ActionButton
|
||||
icon="bx bx-chevron-left"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user