npm.io
1.4.9 • Published 2 years ago

@types/redux-first-router-link

Licence
MIT
Version
1.4.9
Deps
2
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/redux-first-router-link

Summary

This package contains type definitions for redux-first-router-link (https://github.com/faceyspacey/redux-first-router-link#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-first-router-link.

index.d.ts

import * as React from "react";
import { Location } from "redux-first-router";

export type To = string | string[] | object;

export interface Match<P> {
    params: P;
    isExact: boolean;
    path: string;
    url: string;
}

// Unfortunately we can't pass `HTMLAnchorElement` since the `tagName` attribute allows you to use other tags than anchor.
export interface LinkProps extends React.HTMLAttributes<HTMLElement> {
    to: To;
    redirect?: boolean | undefined;
    replace?: boolean | undefined;
    tagName?: string | undefined;
    down?: boolean | undefined;
    shouldDispatch?: boolean | undefined;
    target?: string | undefined;
    children?: React.ReactNode;
}

export default class Link extends React.Component<LinkProps> {}

export interface NavLinkProps extends LinkProps {
    activeClassName?: string | undefined;
    activeStyle?: React.CSSProperties | undefined;
    ariaCurrent?: string | undefined;
    exact?: boolean | undefined;
    strict?: boolean | undefined;
    children?: React.ReactNode;
    isActive?(match: Match<object>, location: Location): boolean;
}

export class NavLink extends React.Component<NavLinkProps> {}

Additional Details

Credits

These definitions were written by janb87.