DefinitelyTyped/types/react-router-tabs/index.d.ts
Joakim Unge fd12683a84
refactor: update type definitions for react-router-tabs (#41998)
* feat: update types for react-router-tabs

* test: rewrite tests with jsx

* refactor: change NavTab type
2020-01-31 14:28:26 -08:00

31 lines
997 B
TypeScript

// Type definitions for react-router-tabs 1.3
// Project: https://github.com/chacestew/react-router-tabs#readme
// Definitions by: Joakim Unge <https://github.com/joakimunge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Route, Link, RouteProps, LinkProps, NavLinkProps } from 'react-router-dom';
import { ReactNode, ComponentType } from 'react';
export type AriaCurrent = 'page' | 'step' | 'location' | 'date' | 'time' | 'true';
export interface NavTabProps extends NavLinkProps {
style?: React.CSSProperties;
disabled?: boolean;
allowClickOnActive?: boolean;
'aria-current'?: AriaCurrent;
}
export interface RoutedTabsProps {
startPathWith?: string;
className?: string;
style?: object;
tabClassName?: string;
activeTabClassName?: string;
tabStyle?: object;
activeTabStyle?: object;
children?: ReactNode;
}
export const NavTab: ComponentType<NavTabProps>;
export const RoutedTabs: ComponentType<RoutedTabsProps>;