Skip to content

Commit

Permalink
feat(location): add the iconStyle properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lulutia committed Jun 12, 2016
1 parent fa43642 commit d181481
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ npm install react-native-picker-xg --save
* pickerNameStyle: CSS-layout, the style of the pickerName
* cancelBtnStyle: CSS-layout, the style of the cancel button
* confirmBtnStyle: CSS-layout, the confirm button's style
* iconStyle: CSS-layout, the right downdrop button's style
* inputStyle: CSS-layout, the textInput's style
* navStyle: CSS-layout, the style of the nav of the picker
* textStyle: CSS-layout, the style of the inputText's inner text
Expand All @@ -38,6 +39,7 @@ npm install react-native-picker-xg --save
* inputStyle: CSS-layout, the textInput's style
* navStyle: CSS-layout, the style of the nav of the picker
* textStyle: CSS-layout, the style of the inputText's inner text
* iconStyle: CSS-layout, the right downdrop button's style
* pickerName: string, the text of the picker's name
* inputValue: string, the initial text of the textInput
* selectIndex: [number] ,initial selected item
Expand Down
4 changes: 3 additions & 1 deletion app/csetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class CPickerroll extends Component {
navStyle: View.propTypes.style,
//输入框内部字体样式
textStyle: Text.propTypes.style,
//右边下拉按钮的样式
iconStyle: View.propTypes.style,
//picker的名称
pickerName: PropTypes.string,
//输入框内部文字初始值
Expand Down Expand Up @@ -342,7 +344,7 @@ class CPickerroll extends Component {
placeholder={this.state.inputValue}
value={this.state.inputValue}
/><TouchableOpacity className="arrowDown" style={styles.iconOuter} onPress={() => { this._setEventBegin()}}>
<Image source={require('./img/arrow.png')} />
<Image source={require('./img/arrow.png')} style={[styles.icon, this.props.iconStyle]} />
</TouchableOpacity>
</View>
</View>
Expand Down
4 changes: 3 additions & 1 deletion app/setup3.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class TMPicker extends Component {
navStyle: View.propTypes.style,
//输入框内部字体样式
textStyle: Text.propTypes.style,
//右边下拉按钮的样式
iconStyle: View.propTypes.style,
//picker的名称
pickerName: PropTypes.string,
//输入框内部文字初始值
Expand Down Expand Up @@ -281,7 +283,7 @@ class TMPicker extends Component {
placeholder={this.state.inputValue}
value={this.state.inputValue}
/><TouchableOpacity className="arrowDown" style={styles.iconOuter}onPress={() => { this._setEventBegin()}}>
<Image source={require('./img/arrow.png')} />
<Image source={require('./img/arrow.png')} style={[styles.icon, this.props.iconStyle]}/>
</TouchableOpacity>
</View>
</View>
Expand Down
4 changes: 4 additions & 0 deletions app/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ let styles = StyleSheet.create({
container2Icon: {
flex:1,
marginTop:-10,
},
icon: {
width:30,
height:30
}
});

Expand Down

0 comments on commit d181481

Please sign in to comment.