UNPKG

react-router-relative-link-5

Version:

A wrapper around react-router's Link that allows relative paths. For react-router version 5

9 lines (8 loc) 1.03 kB
import React from 'react'; import { LinkProps, NavLinkProps, RouteComponentProps } from 'react-router-dom'; import { Location, LocationDescriptorObject } from 'history'; declare const CoreLink: ({ BaseComponent, match, to: relativeTo, staticContext, ...others }: { BaseComponent: React.ComponentClass<LinkProps<import("history").History.PoorMansUnknown>, any> | React.FunctionComponent<LinkProps<import("history").History.PoorMansUnknown>> | React.ComponentClass<NavLinkProps<import("history").History.PoorMansUnknown>, any> | React.FunctionComponent<NavLinkProps<import("history").History.PoorMansUnknown>> | ((props: any) => any); to: string | LocationDescriptorObject<import("history").History.PoorMansUnknown> | ((l: Location<import("history").History.PoorMansUnknown>) => import("history").History.LocationDescriptor<import("history").History.PoorMansUnknown>); } & RouteComponentProps<{}, import("react-router").StaticContext, import("history").History.PoorMansUnknown>) => JSX.Element; export default CoreLink;