react-expand
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -11,2 +11,3 @@ /// <reference types="react" /> | ||
registerTab: PropTypes.Validator<any>; | ||
activeTab?: PropTypes.Validator<any>; | ||
}; | ||
@@ -13,0 +14,0 @@ static readonly propTypes: { |
@@ -11,2 +11,3 @@ /// <reference types="react" /> | ||
registerTab: PropTypes.Validator<any>; | ||
activeTab?: PropTypes.Validator<any>; | ||
}; | ||
@@ -13,0 +14,0 @@ static readonly propTypes: { |
@@ -8,4 +8,11 @@ /// <reference types="react" /> | ||
tabs: Set<string>; | ||
activeTab?: string; | ||
} | ||
export declare class TabsController extends React.Component<{}, TabsControllerState> { | ||
export interface TabsControllerProps { | ||
defaultOpened?: string; | ||
} | ||
export declare const TabsControllerPropTypes: { | ||
[P in keyof TabsControllerProps]: PropTypes.Validator<any>; | ||
}; | ||
export declare class TabsController extends React.Component<TabsControllerProps, TabsControllerState> { | ||
static readonly childContextTypes: { | ||
@@ -15,3 +22,7 @@ changeActiveTab: PropTypes.Validator<any>; | ||
registerTab: PropTypes.Validator<any>; | ||
activeTab?: PropTypes.Validator<any>; | ||
}; | ||
static readonly propTypes: { | ||
defaultOpened?: PropTypes.Validator<any>; | ||
}; | ||
static readonly contextTypes: { | ||
@@ -23,8 +34,8 @@ changeExpandState: PropTypes.Validator<any>; | ||
readonly context: ExpandContext; | ||
constructor(props: any); | ||
readonly state: TabsControllerState; | ||
getChildContext(): TabsContext; | ||
render(): React.ReactNode; | ||
protected changeActiveTab: (id: string) => void; | ||
protected changeActiveTab: (activeTab: string) => void; | ||
protected unregisterTab: (id: string) => boolean; | ||
protected registerTab: (id: string) => void; | ||
} |
@@ -6,2 +6,3 @@ import * as PropTypes from "prop-types"; | ||
registerTab: (id: string) => void; | ||
activeTab?: string; | ||
} | ||
@@ -8,0 +9,0 @@ export declare const TabsContextTypes: { |
{ | ||
"name": "react-expand", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Simple element expand state controlling", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -208,3 +208,3 @@ # React Expand | ||
```jsx | ||
<TabsController> | ||
<TabsController defaultOpened="tab_2"> | ||
<Header activeClassName="is-active" expandId="tab_1" {...HTMLDivElementProps} > // Click on header to activate according tab | ||
@@ -211,0 +211,0 @@ ... |
Sorry, the diff of this file is too big to display
335744
6494