Add SafeAnchor

This commit is contained in:
Batbold Gansukh
2016-08-06 16:24:14 +09:00
parent bc38caf4c4
commit 0f4a73ef20
2 changed files with 21 additions and 1 deletions
+9 -1
View File
@@ -14,7 +14,7 @@ import {
OverlayTrigger, Popover, ProgressBar,
Nav, NavItem, Navbar, NavDropdown,
Tabs, Tab, Pager, PageItem,
Pagination, Alert, Carousel,
Pagination, Alert, Carousel, SafeAnchor,
Grid, Row, Col, Thumbnail, Image,
Label, Badge, Jumbotron, PageHeader,
Glyphicon, Table, Form, FormGroup,
@@ -634,6 +634,14 @@ export class ReactBootstrapTest extends Component<any, any> {
</div>
</div>
<div style={style}>
<Pagination
buttonComponentClass={( props:any ) =>
<SafeAnchor href="/test" disabled role="role"/>
}
maxButtons={10}/>
</div>
<div style={style}>
<Alert bsStyle='warning'>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
+12
View File
@@ -110,6 +110,18 @@ declare namespace ReactBootstrap {
var ButtonGroup: React.ClassicComponentClass<ButtonGroupProps>;
// <SafeAnchor />
interface SafeAnchorProps extends React.HTMLProps<SafeAnchor> {
href?: string;
onClick?: React.MouseEventHandler;
disabled?: boolean;
role?: string;
componentClass?: React.ReactType;
}
type SafeAnchor = React.ClassicComponent<SafeAnchorProps, {}>;
const SafeAnchor: React.ClassicComponentClass<SafeAnchorProps>;
// <Checkbox />
interface CheckboxProps extends React.HTMLProps<Checkbox> {
bsClass?: string;