react-native-custom-accordian
v0.0.2
Published
Accordian Library for React native for both android and ios
Downloads
83
Maintainers
Readme
react-native-custom-accordian
Accordian Library for React native for both android and ios
Installation:
Install the component through npm using:
npm install react-native-custom-accordian --save
Example1:
import PanelList from "react-native-custom-accordian";
<PanelList
disableContentClick={true}
data={[
{ title: "click to expand", content: "test", expanded: false },
{ title: "click to expand", content: "test 1", expanded: false }
]}
renderContent={this.renderContent}
/>;
Props:
*
- mandatory
| Props Name | Description |
| --------------------- | ------------------------------------- |
| disableContentClick
| value defined to get click on content |
| * data
| describes parameters in an array |
| * renderContent
| function that renders content |
Example2:
import Panel from "react-native-custom-accordian";
<Panel {...this.props} title={item.title} expanded={item.expanded}>
{this.props.renderContent(item)}
</Panel>;
Props:
*
- mandatory
| Props Name | Description |
| ----------------- | ---------------------------------------------------- |
| * title
| The element that will expand the title when pressed. |
| * expanded
| condition to check whether expanded or not. |
| * renderContent
| The content you want hidden in the title. |