24 lines
1003 B
TypeScript
24 lines
1003 B
TypeScript
import type { HTMLAttributes, LiHTMLAttributes } from "react";
|
|
import { Button, type ButtonProps } from "@/components/ui/button";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export function Pagination({ className, ...props }: HTMLAttributes<HTMLElement>) {
|
|
return <nav role="navigation" aria-label="pagination" className={cn(className)} {...props} />;
|
|
}
|
|
|
|
export function PaginationContent({ className, ...props }: HTMLAttributes<HTMLUListElement>) {
|
|
return <ul className={cn(className)} {...props} />;
|
|
}
|
|
|
|
export function PaginationItem({ className, ...props }: LiHTMLAttributes<HTMLLIElement>) {
|
|
return <li className={cn(className)} {...props} />;
|
|
}
|
|
|
|
export function PaginationLink({ className, isActive, ...props }: ButtonProps & { isActive?: boolean }) {
|
|
return <Button data-active={isActive} className={cn(className)} {...props} />;
|
|
}
|
|
|
|
export function PaginationEllipsis({ className, ...props }: HTMLAttributes<HTMLSpanElement>) {
|
|
return <span aria-hidden className={cn(className)} {...props} />;
|
|
}
|