DefinitelyTyped/react-router/lib/Link.d.ts
Bjarke Hesthaven Søndergaard 33c936d681 [react-router] Update LinkProps to current typings (#13704)
* Update LinkProps to current typings

This allows use in stateless higher order components.

* Add test for stateless HOC using LinkProps
2017-01-12 09:38:35 -08:00

20 lines
585 B
TypeScript

import * as React from 'react';
import Router from './Router';
declare const Link: Link;
type Link = Link.Link;
export default Link;
declare namespace Link {
interface LinkProps extends React.HTMLAttributes<Link> {
activeStyle?: React.CSSProperties;
activeClassName?: string;
onlyActiveOnIndex?: boolean;
to: Router.RoutePattern | Router.LocationDescriptor | ((...args: any[]) => Router.LocationDescriptor);
}
interface Link extends React.ComponentClass<LinkProps> {}
interface LinkElement extends React.ReactElement<LinkProps> {}
}