Skip to content

Commit 9a2464b

Browse files
committed
Fix
2 parents 0e0dadd + a48925c commit 9a2464b

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Pedro Henrique Oliveira da Silva
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# react-native-editable-list
2+
3+
> An editable React list component
4+
5+
[![NPM](https://img.shields.io/npm/v/react-native-editable-list.svg)](https://www.npmjs.com/package/react-native-editable-list) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6+
7+
## Install
8+
9+
```bash
10+
npm install --save react-native-editable-list
11+
```
12+
13+
## Usage
14+
15+
```jsx
16+
import React, { useState } from 'react';
17+
import { StyleSheet, Text, View, FlatList, TextInput, TouchableOpacity } from 'react-native';
18+
import EditableList from 'react-native-editable-list'
19+
20+
export default function App() {
21+
const [list, setList] = useState([]);
22+
return (
23+
<View style={styles.container}>
24+
<EditableList placeholder='Type something' onListChange={setList.bind(this)} list={list}/>
25+
<Text style={styles.data}> Data </Text>
26+
<Text> {list.length ? JSON.stringify(list) : 'Please, type something.'} </Text>
27+
</View>
28+
);
29+
}
30+
31+
const styles = StyleSheet.create({
32+
container: {
33+
flex: 1,
34+
backgroundColor: 'yellow',
35+
alignItems: 'center',
36+
justifyContent: 'center',
37+
padding: 40
38+
},
39+
data: {
40+
fontSize: 20
41+
}
42+
});
43+
```
44+
45+
## License
46+
47+
MIT © [phos-dev](https://github.com/phos-dev)

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ EditableList.defaultProps = {
133133
placeholder: 'Type Something'
134134
};
135135

136-
export default EditableList;
136+
export default EditableList;

0 commit comments

Comments
 (0)