UNPKG

react-navi

Version:

A batteries-included router for react.

10 lines (9 loc) 506 B
import * as React from 'react'; export declare type HashScrollBehavior = 'smooth' | 'auto' | 'none' | ((hash: string | undefined | null) => void); export declare const HashScrollContext: React.Context<HashScrollBehavior>; export interface HashScrollProps { behavior?: HashScrollBehavior; children: React.ReactNode; } export declare function HashScroll(props: HashScrollProps): JSX.Element; export declare function scrollToHash(hash: string | undefined | null, behavior?: HashScrollBehavior): void;