0.0.2 • Published 6 years ago

react-native-custom-accordian v0.0.2

Weekly downloads
5
License
-
Repository
github
Last release
6 years ago

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 NameDescription
disableContentClickvalue defined to get click on content
* datadescribes parameters in an array
* renderContentfunction 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 NameDescription
* titleThe element that will expand the title when pressed.
* expandedcondition to check whether expanded or not.
* renderContentThe content you want hidden in the title.

react-native-custom-accordian