UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

40 lines (39 loc) 1.8 kB
import { RenderProps } from "../utils/types.js"; import "../utils/index.js"; import { ThemingProps } from "../theme/types.js"; import "../theme/index.js"; import { BoxProps } from "../box/box.types.js"; import "../box/index.js"; import { ButtonProps } from "../button/button.types.js"; import "../button/index.js"; import { UsePaginationProps } from "./usePagination.types.js"; import { UsePaginationReturnType } from "./usePagination.js"; import { JSX } from "react"; //#region src/pagination/pagination.types.d.ts type PaginationButtonProps = ButtonProps & { /** Applies different styling to a button of the current page. */ isActive?: boolean; /** Number of the page, which this button represents. */ page: number; }; type PaginationContext = UsePaginationReturnType & ThemingProps<'Pagination'>; type PaginationItem = 'ellipsisEnd' | 'ellipsisStart' | 'next' | 'previous' | number; type PaginationPrevNextProps = ButtonProps & { /** Defines the logic of previous and next buttons. */ direction: 'previous' | 'next'; }; type PaginationProps = Omit<BoxProps, 'size' | 'variant'> & ThemingProps<'Pagination'> & UsePaginationProps & { /** Children provide render props using PaginationContext data. */ children?: RenderProps<PaginationContext>; /** Socket for page input on the right side. */ goToPage?: JSX.Element; /** Array describing pagination items, like page buttons, prev/next arrows or ellipsis. */ items?: PaginationItem[]; /** Socket for the main navigation elements in the middle. */ navigation?: JSX.Element; /** Socket for numbers data on the left side. */ results?: JSX.Element; }; //#endregion export { PaginationButtonProps, PaginationContext, PaginationItem, PaginationPrevNextProps, PaginationProps }; //# sourceMappingURL=pagination.types.d.ts.map