react-expand
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -42,3 +42,3 @@ /// <reference types="react" /> | ||
}; | ||
export declare class SliderController extends React.Component<SliderControllerProps> { | ||
export declare class SliderController extends React.Component<SliderControllerProps, SliderControllerState> { | ||
static readonly childContextTypes: { | ||
@@ -82,3 +82,4 @@ registerSlide: PropTypes.Validator<any>; | ||
private getSlideByIndex; | ||
private readonly contextActiveSlide; | ||
private readonly isNoActiveSlide; | ||
} |
@@ -34,2 +34,3 @@ /// <reference types="react" /> | ||
getChildContext(): TabsContext; | ||
componentDidUpdate(): void; | ||
render(): React.ReactNode; | ||
@@ -36,0 +37,0 @@ protected changeActiveTab: (activeTab: string) => void; |
export * from "./Components/Tabs"; | ||
export * from "./Components/Modal"; | ||
export * from "./Components/Slider"; | ||
export * from "./Components/HashControl"; | ||
export * from "./Components/HashListener"; | ||
export * from "./Components/ExpandControl"; | ||
export * from "./Components/ExpandController"; | ||
export * from "./Components/ControlledExpandElement"; |
{ | ||
"name": "react-expand", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Simple element expand state controlling", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -206,2 +206,27 @@ # React Expand | ||
NOTE: You must provide context to child nodes with `<ExpandController>` | ||
#### HashListener | ||
```jsx | ||
// will expand element with expandId 'expandElementId1' and 'expandElementId2' | ||
// when href will be 'somepath/#expandElementId2/anotherPathIfYouWant/#expandElementId1' | ||
<HashListener> | ||
<ControlledExpandElement expandId="expandElementId1"/> | ||
<ControlledExpandElement expandId="expandElementId2"/> | ||
</HashListener> | ||
``` | ||
#### HashControl | ||
```jsx | ||
// same as html link, except activeClassName, that binds when element with | ||
// href, that contains expand keys, is active | ||
<HashControl | ||
{...HTMLAnchorProps} | ||
activeClassName="active" | ||
href="somepath/#expandElementId2/anotherPathIfYouWant/#expandElementId1" | ||
> | ||
... | ||
</HashControl> | ||
``` | ||
#### Tabs | ||
@@ -208,0 +233,0 @@ ```jsx |
Sorry, the diff of this file is too big to display
382995
35
7406
333