Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hyochan/react-native-drop-down-item

Dropdown list item for react-native.
https://github.com/hyochan/react-native-drop-down-item

dropdown react-native

Last synced: 8 days ago
JSON representation

Dropdown list item for react-native.

Awesome Lists containing this project

README

        

# react-native-drop-down-item (`Deprecated!`)

> Current package has been moved to [@dooboo-ui/native-accordion](https://www.npmjs.com/package/@dooboo-ui/native-accordion)

[![Npm Version](http://img.shields.io/npm/v/react-native-drop-down-item.svg?style=flat-square)](https://npmjs.org/package/react-native-drop-down-item)
[![Downloads](http://img.shields.io/npm/dm/react-native-drop-down-item.svg?style=flat-square)](https://npmjs.org/package/react-native-drop-down-item)
[![Build Status](https://travis-ci.com/dooboolab/react-native-drop-down-item.svg?branch=master)](https://travis-ci.com/dooboolab/react-native-drop-down-item)
![License](http://img.shields.io/npm/l/react-native-drop-down-item.svg?style=flat-square)

Simple drop down item component for react-native. This component supports drop down toggle with animation.

## Npm repo

https://www.npmjs.com/package/react-native-drop-down-item

## Git repo

https://github.com/dooboolab/react-native-drop-down-item

## Props

| | necessary | types | default |
| ----------------- | --------- | ------- | ------------- |
| contentVisible | | boolean | `false` |
| header | ✓ | any | `` |
| backgroundColor | | string | `transparent` |
| titleBackground | | string | `transparent` |
| contentBackground | | string | `transparent` |
| underlineColor | | string | `transparent` |
| visibleImage | | any | `undefined` |
| invisibleImage | | any | `undefined` |

## Getting started

`$ npm install react-native-drop-down-item --save`

- Import

```javascript
import DropDownItem from "react-native-drop-down-item";
```

- Data

```javascript
state = {
contents: [
{
title: "Title 1",
body: "Hi. I love this component. What do you think?"
},
{
title: "See this one too",
body: "Yes. You can have more items."
},
{
title: "Thrid thing",
body:
"What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text? What about very long text?"
}
]
};
```

- Usage
```javascript


{
this.state.contents
? this.state.contents.map((param, i) => {
return (

{param.title}

}
>

{param.body}


);
})
: null
}



});
```