summit-kit
Version:
A React component library for building modern web applications with an earthy and outdoorsy flair.
24 lines (23 loc) • 1.19 kB
TypeScript
type PageTurnerProps = {
children: React.ReactNode;
onNext?: () => void;
onPrev?: () => void;
onUp?: () => void;
onDown?: () => void;
};
/**
* A React component that provides navigation controls for paging or sliding content.
*
* The `PageTurner` component renders navigation buttons (next, previous, up, down) based on the provided callback props.
* It also enables keyboard shortcuts for navigation using the `Control+Shift+Arrow` key combinations.
*
* @param {React.ReactNode} children - The content to be displayed inside the page slider.
* @param {() => void} [onNext] - Callback function to be called when navigating to the next page.
* @param {() => void} [onPrev] - Callback function to be called when navigating to the previous page.
* @param {() => void} [onUp] - Callback function to be called when navigating up.
* @param {() => void} [onDown] - Callback function to be called when navigating down.
*
* @returns {JSX.Element} The rendered PageTurner component with navigation controls.
*/
export declare const PageTurner: ({ children, onNext, onPrev, onUp, onDown, }: PageTurnerProps) => import("react/jsx-runtime").JSX.Element;
export {};