ui/pager: add support for custom CSS class

This commit is contained in:
Adorian Doran 2026-02-23 11:28:35 +02:00
parent 00046d4145
commit 8edf5483a6

View File

@ -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"