preload-next
Version:
A Preload Link Component for Next.js to handle seamless page transitions
23 lines • 795 B
TypeScript
/// <reference types="node" />
import { UrlObject } from "url";
import React, { HTMLAttributes } from "react";
type Url = string | UrlObject;
export type LinkPreloadProps = {
href: Url;
as?: Url;
replace?: boolean;
scroll?: boolean;
shallow?: boolean;
passHref?: boolean;
prefetch?: boolean;
locale?: string | false;
} & Omit<HTMLAttributes<HTMLAnchorElement>, "href" | "as" | "passHref">;
export declare const LinkPreload: (props: React.PropsWithChildren<LinkPreloadProps>) => React.DetailedReactHTMLElement<{
onMouseEnter?: React.MouseEventHandler<Element> | undefined;
onClick: React.MouseEventHandler;
className?: string | undefined;
href?: Url | undefined;
ref?: any;
}, HTMLElement>;
export {};
//# sourceMappingURL=link-preload.d.ts.map