import * as React from 'react'; import { URLDescriptor } from 'navi'; import { HashScrollBehavior } from './HashScroll'; export interface UseLinkPropsOptions { disabled?: boolean; hashScrollBehavior?: HashScrollBehavior; href: string | Partial; prefetch?: boolean | 'hover' | 'mount'; state?: object; onClick?: React.MouseEventHandler; onMouseEnter?: React.MouseEventHandler; } /** * Returns a boolean that indicates whether the user is currently * viewing the specified href. * @param href * @param options.exact If false, will match any URL underneath this href * @param options.loading If true, will match even if the route is currently loading */ export declare const useActive: (href: string | Partial, { exact, loading, }?: { /** * If false, will return true even if viewing a child of this route. */ exact?: boolean | undefined; /** * If true, this will return true even if the route is currently just * loading. */ loading?: boolean | undefined; }) => boolean; export declare const useLinkProps: ({ disabled, hashScrollBehavior, href, prefetch, state, onClick, onMouseEnter, }: UseLinkPropsOptions) => { onClick: (event: React.MouseEvent) => void; onMouseEnter: (event: React.MouseEvent) => void; href: string; }; export interface LinkProps extends UseLinkPropsOptions, Omit, 'href'> { active?: boolean; activeClassName?: string; activeStyle?: object; exact?: boolean; ref?: React.Ref; } export declare namespace Link { type Props = LinkProps; } export declare const Link: React.FunctionComponent;