@combine-labs/combine-polaris
Version:
Combine Lab's product component library. Forked from Shopify's Polaris.
36 lines (35 loc) • 1.48 kB
TypeScript
import * as React from 'react';
import { WithAppProviderProps } from '../AppProvider';
import { Keys } from '../../types';
export interface PaginationDescriptor {
/** Keyboard shortcuts for the next button */
nextKeys?: Keys[];
/** Keyboard shortcuts for the previous button */
previousKeys?: Keys[];
/** Tooltip for the next button */
nextTooltip?: string;
/** Tooltip for the previous button */
previousTooltip?: string;
/** The URL of the next page */
nextURL?: string;
/** The URL of the previous page */
previousURL?: string;
/** Whether there is a next page to show */
hasNext?: boolean;
/** Whether there is a previous page to show */
hasPrevious?: boolean;
/** Accessible label for the pagination */
accessibilityLabel?: string;
/** Callback when next button is clicked */
onNext?(): void;
/** Callback when previous button is clicked */
onPrevious?(): void;
}
export interface Props extends PaginationDescriptor {
/** A more subdued control for use in headers */
plain?: boolean;
}
export declare type CombinedProps = Props & WithAppProviderProps;
declare function Pagination({ hasNext, hasPrevious, nextURL, previousURL, onNext, onPrevious, nextTooltip, previousTooltip, nextKeys, previousKeys, plain, accessibilityLabel, polaris: { intl }, }: CombinedProps): JSX.Element;
declare const _default: React.ComponentClass<Props> & typeof Pagination;
export default _default;