mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added typings for react-router-bootstrap
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// React-Bootstrap Test
|
||||
// ================================================================================
|
||||
///<reference path="react-bootstrap.d.ts"/>
|
||||
///<reference path="react-router-bootstrap.d.ts"/>
|
||||
///<reference path="../react/react.d.ts"/>
|
||||
|
||||
// Imports
|
||||
@@ -8,6 +9,7 @@
|
||||
import * as React from 'react';
|
||||
import { Component, CSSProperties } from 'react';
|
||||
import { Button, ButtonToolbar, Modal, Well, ButtonGroup, DropdownButton, MenuItem, Panel, ListGroup, ListGroupItem, Accordion, Tooltip, OverlayTrigger, Popover, ProgressBar, Nav, NavItem, Navbar, NavDropdown, Tabs, Tab, Pager, PageItem, Pagination, Alert, Carousel, CarouselItem, Grid, Row, Col, Thumbnail, Label, Badge, Jumbotron, PageHeader, Glyphicon, Table, Input, ButtonInput } from 'react-bootstrap';
|
||||
import { LinkContainer, IndexLinkContainer } from 'react-router-bootstrap'
|
||||
|
||||
|
||||
export class ReactBootstrapTest extends Component<any, any> {
|
||||
@@ -892,6 +894,11 @@ export class ReactBootstrapTest extends Component<any, any> {
|
||||
</Row>
|
||||
</Input>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<LinkContainer to="/page"><Button>Link</Button></LinkContainer>
|
||||
<IndexLinkContainer to="/index"><Button>Link</Button></IndexLinkContainer>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
// Type definitions for react-router-bootstrap
|
||||
// Project: https://github.com/react-bootstrap/react-router-bootstrap
|
||||
// Definitions by: Vincent Lesierse <https://github.com/vlesierse>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../react/react.d.ts"/>
|
||||
///<reference path="../react-router/react-router.d.ts"/>
|
||||
|
||||
declare namespace ReactRouterBootstrap {
|
||||
// Import React
|
||||
import React = __React;
|
||||
|
||||
interface LinkContainerProps extends ReactRouter.LinkProps {
|
||||
disabled?: boolean
|
||||
}
|
||||
interface LinkContainer extends React.ComponentClass<LinkContainerProps> {}
|
||||
interface LinkContainerElement extends React.ReactElement<LinkContainerProps> {}
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user