Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/hyochan/react-native-drop-down-item
- Owner: hyochan
- License: isc
- Created: 2018-11-03T09:45:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T18:03:27.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T17:38:36.403Z (15 days ago)
- Topics: dropdown, react-native
- Language: JavaScript
- Size: 1.37 MB
- Stars: 52
- Watchers: 1
- Forks: 12
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
}
});
```