Skip to content

Commit 7fd3beb

Browse files
committed
Rename project
1 parent 849c0b8 commit 7fd3beb

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
[![npm version](https://badge.fury.io/js/react-native-modal-picker.svg)](https://badge.fury.io/js/react-native-modal-picker)
2-
3-
# react-native-modal-picker
1+
# react-native-modal-selector
42
A cross-platform (iOS / Android), selector/picker component for React Native that is highly customizable and supports sections.
53

64
## Demo
@@ -10,7 +8,7 @@ A cross-platform (iOS / Android), selector/picker component for React Native tha
108
## Install
119

1210
```sh
13-
npm i react-native-modal-picker --save
11+
npm i react-native-modal-selector --save
1412
```
1513

1614
## Usage
@@ -21,7 +19,7 @@ See `SampleApp` for an example how to use this component.
2119

2220
```jsx
2321

24-
import ModalPicker from 'react-native-modal-picker'
22+
import ModalSelector from 'react-native-modal-selector'
2523

2624
[..]
2725

@@ -58,12 +56,12 @@ class SampleApp extends Component {
5856
return (
5957
<View style={{flex:1, justifyContent:'space-around', padding:50}}>
6058

61-
<ModalPicker
59+
<ModalSelector
6260
data={data}
6361
initValue="Select something yummy!"
6462
onChange={(option)=>{ alert(`${option.label} (${option.key}) nom nom nom`) }} />
6563

66-
<ModalPicker
64+
<ModalSelector
6765
data={data}
6866
initValue="Select something yummy!"
6967
onChange={(option)=>{ this.setState({textInputValue:option.label})}}>
@@ -74,7 +72,7 @@ class SampleApp extends Component {
7472
placeholder="Select something yummy!"
7573
value={this.state.textInputValue} />
7674

77-
</ModalPicker>
75+
</ModalSelector>
7876
</View>
7977
);
8078
}

SampleApp/app.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
TextInput
88
} from 'react-native';
99

10-
import ModalPicker from 'react-native-modal-picker'
10+
import ModalSelector from 'react-native-modal-selector'
1111

1212
class SampleApp extends Component {
1313

@@ -43,16 +43,16 @@ class SampleApp extends Component {
4343
<View style={{flex:1, justifyContent:'space-around', padding:50}}>
4444

4545
{ /* Default mode: a clickable button will re rendered */ }
46-
<ModalPicker
46+
<ModalSelector
4747
data={data}
4848
initValue="Select something yummy!"
4949
onChange={(option)=>{ alert(`${option.label} (${option.key}) nom nom nom`) }}/>
5050

5151
{ /*
52-
Wrapper mode: just wrap your existing component with ModalPicker.
52+
Wrapper mode: just wrap your existing component with ModalSelector.
5353
When the user clicks on your element, the modal selector is shown.
5454
*/ }
55-
<ModalPicker
55+
<ModalSelector
5656
data={data}
5757
initValue="Select something yummy!"
5858
onChange={(option)=>{ this.setState({textInputValue:option.label})}}>
@@ -63,10 +63,10 @@ class SampleApp extends Component {
6363
placeholder="Select something yummy!"
6464
value={this.state.textInputValue} />
6565

66-
</ModalPicker>
66+
</ModalSelector>
6767
</View>
6868
);
6969
}
7070
}
7171

72-
export default SampleApp;
72+
export default SampleApp;

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const defaultProps = {
5555
keyboardShouldPersistTaps: 'always'
5656
};
5757

58-
export default class ModalPicker extends BaseComponent {
58+
export default class ModalSelector extends BaseComponent {
5959

6060
constructor() {
6161

@@ -132,7 +132,7 @@ export default class ModalPicker extends BaseComponent {
132132
});
133133

134134
return (
135-
<View style={[styles.overlayStyle, this.props.overlayStyle]} key={'modalPicker'+(componentIndex++)}>
135+
<View style={[styles.overlayStyle, this.props.overlayStyle]} key={'modalSelector'+(componentIndex++)}>
136136
<View style={styles.optionContainer}>
137137
<ScrollView keyboardShouldPersistTaps={this.props.keyboardShouldPersistTaps}>
138138
<View style={{paddingHorizontal:10}}>
@@ -182,5 +182,5 @@ export default class ModalPicker extends BaseComponent {
182182
}
183183
}
184184

185-
ModalPicker.propTypes = propTypes;
186-
ModalPicker.defaultProps = defaultProps;
185+
ModalSelector.propTypes = propTypes;
186+
ModalSelector.defaultProps = defaultProps;

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "react-native-modal-picker",
3-
"version": "0.0.16",
2+
"name": "react-native-modal-selector",
3+
"version": "0.0.17",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
@@ -9,7 +9,7 @@
99
},
1010
"repository": {
1111
"type": "git",
12-
"url": "https://github.com/d-a-n/react-native-modal-picker.git"
12+
"url": "https://github.com/peacechen/react-native-modal-selector.git"
1313
},
1414
"keywords": [
1515
"react-native",
@@ -30,11 +30,15 @@
3030
{
3131
"name": "Alex Spring",
3232
"email": "[email protected]"
33+
},
34+
{
35+
"name": "Peace Chen",
36+
"url": "https://github.com/peacechen"
3337
}
3438
],
3539
"license": "MIT",
3640
"bugs": {
37-
"url": "https://github.com/d-a-n/react-native-modal-picker/issues"
41+
"url": "https://github.com/peacechen/react-native-modal-selector/issues"
3842
},
39-
"homepage": "https://github.com/d-a-n/react-native-modal-picker"
43+
"homepage": "https://github.com/peacechen/react-native-modal-selector"
4044
}

0 commit comments

Comments
 (0)