react-native-custom-accordian

0.0.2 • Public • Published

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.

react-native-custom-accordian

Package Sidebar

Install

npm i react-native-custom-accordian

Weekly Downloads

12

Version

0.0.2

License

none

Last publish

Collaborators

  • ileaf