Merge pull request #14653 from chengsieuly/master

Update react-bootstrap typings for ResponsiveEmbed
This commit is contained in:
Mine Starks
2017-03-06 17:57:34 -08:00
committed by GitHub
2 changed files with 25 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
// Type definitions for react-bootstrap
// Project: https://github.com/react-bootstrap/react-bootstrap
// Definitions by: Walker Burgin <https://github.com/walkerburgin>, Vincent Siao <https://github.com/vsiao>, Danilo Barros <https://github.com/danilojrr>, Batbold Gansukh <https://github.com/Batbold-Gansukh>, Raymond May Jr. <https://github.com/octatone>
// Definitions by: Walker Burgin <https://github.com/walkerburgin>, Vincent Siao <https://github.com/vsiao>, Danilo Barros <https://github.com/danilojrr>, Batbold Gansukh <https://github.com/Batbold-Gansukh>, Raymond May Jr. <https://github.com/octatone>, Cheng Sieu Ly <https://github.com/chengsieuly>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -867,6 +867,15 @@ declare namespace ReactBootstrap {
type Image = React.ClassicComponent<ImageProps, {}>;
var Image: React.ClassicComponentClass<ImageProps>;
// <ResponsiveEmbed />
interface ResponsiveEmbedProps extends React.HTMLProps<ResponsiveEmbed> {
a16by9?: boolean;
a4by3?: boolean;
bsClass?: string;
}
class ResponsiveEmbed extends React.Component<ResponsiveEmbedProps, {}> {
}
// <PageHeader />
interface PageHeaderProps extends React.HTMLProps<PageHeader> {
}

View File

@@ -14,7 +14,7 @@ import {
Nav, NavItem, Navbar, NavDropdown,
Tabs, Tab, Pager, PageItem,
Pagination, Alert, Carousel, SafeAnchor,
Grid, Row, Col, Thumbnail, Image,
Grid, Row, Col, Thumbnail, Image, ResponsiveEmbed,
Label, Badge, Jumbotron, PageHeader,
Glyphicon, Table, Form, FormGroup,
ControlLabel, FormControl, HelpBlock,
@@ -845,6 +845,20 @@ export class ReactBootstrapTest extends Component<any, any> {
<Image src="https://placeholdit.imgix.net/~text?txtsize=33&txt=AUDIO&w=150&h=150" rounded />
</div>
<div style={style}>
<div>
<ResponsiveEmbed a16by9>
Embedded Content
</ResponsiveEmbed>
<ResponsiveEmbed a4by3>
Embedded Content
</ResponsiveEmbed>
<ResponsiveEmbed bsClass='embed-responsive'>
Embedded Content
</ResponsiveEmbed>
</div>
</div>
<div style={style}>
<PageHeader>Example page header <small>Subtext for header</small></PageHeader>
</div>