import React, { forwardRef } from "react"; import { Button, ButtonProps } from "../button"; import type { OverridableComponent } from "../utils-external"; import { cl } from "../utils/helpers"; export interface PaginationItemProps extends ButtonProps { children: React.ReactNode; /** * Sets selected styling if true * @default false */ selected?: boolean; /** * Currently only sets `data-page` attribute. * @deprecated Use `data-page` instead if you need to access the items page number in the future. */ page?: number; /** * Changes padding, height and font-size * @default "medium" */ size?: "medium" | "small" | "xsmall"; } export type PaginationItemType = OverridableComponent< PaginationItemProps, HTMLAnchorElement >; export const Item: PaginationItemType = forwardRef( ( { children, as: Component = "button", selected = false, className, page, "data-color": color, ...rest }: PaginationItemProps & { as?: React.ElementType }, ref, ) => { return ( ); }, ); export default Item;