mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
Added Custom Tab Layout types to react-bootstrap.d.ts
This commit is contained in:
@@ -502,6 +502,33 @@ export class ReactBootstrapTest extends Component<any, any> {
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Tab.Container id="left-tabs-example" defaultActiveKey="first">
|
||||
<Row className="clearfix">
|
||||
<Col sm={4}>
|
||||
<Nav bsStyle="pills" stacked>
|
||||
<NavItem eventKey="first">
|
||||
Tab 1
|
||||
</NavItem>
|
||||
<NavItem eventKey="second">
|
||||
Tab 2
|
||||
</NavItem>
|
||||
</Nav>
|
||||
</Col>
|
||||
<Col sm={8}>
|
||||
<Tab.Content animation>
|
||||
<Tab.Pane eventKey="first">
|
||||
Tab 1 content
|
||||
</Tab.Pane>
|
||||
<Tab.Pane eventKey="second">
|
||||
Tab 2 content
|
||||
</Tab.Pane>
|
||||
</Tab.Content>
|
||||
</Col>
|
||||
</Row>
|
||||
</Tab.Container>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Pager>
|
||||
<PageItem href='#'>Previous</PageItem>
|
||||
|
||||
35
react-bootstrap/react-bootstrap.d.ts
vendored
35
react-bootstrap/react-bootstrap.d.ts
vendored
@@ -435,8 +435,39 @@ declare module "react-bootstrap" {
|
||||
animation?: boolean;
|
||||
eventKey?: any; // TODO: Add more specific type
|
||||
}
|
||||
type Tab = React.ClassicComponent<TabProps, {}>;
|
||||
var Tab: React.ClassicComponentClass<TabProps>;
|
||||
interface TabClass extends React.ClassicComponentClass<TabProps> {
|
||||
Container: TabContainer;
|
||||
Pane: TabPane;
|
||||
Content: TabClass;
|
||||
}
|
||||
type Tab = TabClass;
|
||||
var Tab: TabClass;
|
||||
|
||||
// <Tab.Container />
|
||||
// ----------------------------------------
|
||||
interface TabContainerProps extends React.HTMLAttributes {
|
||||
activeKey?: any;
|
||||
defaultActiveKey?: any;
|
||||
generateChildId?: (eventKey: any, type: any) => string;
|
||||
}
|
||||
type TabContainer = React.ClassicComponentClass<TabContainerProps>;
|
||||
|
||||
// <Tab.Pane />
|
||||
// ----------------------------------------
|
||||
interface TabPaneProps extends React.HTMLAttributes {
|
||||
animation?: boolean | React.ComponentClass<any>;
|
||||
'aria-labelledby'?: string;
|
||||
bsClass?: string;
|
||||
eventKey?: any;
|
||||
onEnter?: Function;
|
||||
onEntered?: Function;
|
||||
onEntering?: Function;
|
||||
onExit?: Function;
|
||||
onExited?: Function;
|
||||
onExiting?: Function;
|
||||
unmountOnExit?: boolean;
|
||||
}
|
||||
type TabPane = React.ClassicComponentClass<TabPaneProps>;
|
||||
|
||||
// <Pager />
|
||||
// ----------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user