diff --git a/react-router-bootstrap/react-router-bootstrap-tests.tsx b/react-router-bootstrap/react-router-bootstrap-tests.tsx new file mode 100644 index 000000000..0211e97e7 --- /dev/null +++ b/react-router-bootstrap/react-router-bootstrap-tests.tsx @@ -0,0 +1,32 @@ +// React-Router-Bootstrap Test +// ================================================================================ +/// +/// +/// + +// Imports +// -------------------------------------------------------------------------------- +import * as React from 'react'; +import { Component, CSSProperties } from 'react'; +import { Button } from 'react-bootstrap'; +import { LinkContainer, IndexLinkContainer } from 'react-router-bootstrap' + + +export class ReactRouterBootstrapTest extends Component { + callback() { + alert('Callback: ' + JSON.stringify(arguments)); + } + + public render() { + let style: CSSProperties = { padding: '50px' }; + return ( +
+ +
+ + +
+
+ ); + } +} diff --git a/react-router-bootstrap/react-router-bootstrap.d.ts b/react-router-bootstrap/react-router-bootstrap.d.ts new file mode 100644 index 000000000..c268a4ad4 --- /dev/null +++ b/react-router-bootstrap/react-router-bootstrap.d.ts @@ -0,0 +1,46 @@ +// Type definitions for react-router-bootstrap +// Project: https://github.com/react-bootstrap/react-router-bootstrap +// Definitions by: Vincent Lesierse +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare namespace ReactRouterBootstrap { + // Import React + import React = __React; + + interface LinkContainerProps extends ReactRouter.LinkProps { + disabled?: boolean + } + interface LinkContainer extends React.ComponentClass {} + interface LinkContainerElement extends React.ReactElement {} + const LinkContainer: LinkContainer + + const IndexLinkContainer: LinkContainer +} + +declare module "react-router-bootstrap/lib/LinkContainer" { + + export default ReactRouterBootstrap.LinkContainer + +} + +declare module "react-router-bootstrap/lib/IndexLinkContainer" { + + export default ReactRouterBootstrap.IndexLinkContainer + +} + +declare module "react-router-bootstrap" { + + import LinkContainer from "react-router-bootstrap/lib/LinkContainer" + + import IndexLinkContainer from "react-router-bootstrap/lib/IndexLinkContainer" + + export { + LinkContainer, + IndexLinkContainer + } + +}