Skip to content

Commit edf16c5

Browse files
committed
Update README, Added new example
1 parent afd90da commit edf16c5

File tree

5 files changed

+7336
-13
lines changed

5 files changed

+7336
-13
lines changed

Example/App.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from "react";
2-
import {StyleSheet, Text, View, ScrollView} from "react-native";
2+
import {StyleSheet, Text, View, ScrollView, Image} from "react-native";
33
import InputSpinner from "react-native-input-spinner";
44

55
export default class App extends Component {
@@ -134,6 +134,23 @@ export default class App extends Component {
134134
rounded={false}
135135
showBorder/>
136136
</View>
137+
<View style={styles.col}>
138+
<Text style={styles.text}>Button image</Text>
139+
<InputSpinner
140+
value={this.state.value}
141+
style={styles.spinner}
142+
color={"#FFF"}
143+
colorPress={"#0F0"}
144+
height={50}
145+
buttonLeftImage={(<Image
146+
style={{width: 50, height: 50}}
147+
source={{uri: 'https://image.flaticon.com/icons/png/512/54/54194.png'}}
148+
/>)}
149+
buttonRightImage={(<Image
150+
style={{width: 50, height: 50}}
151+
source={{uri: 'https://image.flaticon.com/icons/png/512/69/69301.png'}}
152+
/>)}/>
153+
</View>
137154
<View style={styles.col}>
138155
<Text style={styles.text}>colorLeft and colorRight</Text>
139156
<InputSpinner
@@ -155,10 +172,10 @@ export default class App extends Component {
155172
<InputSpinner
156173
value={this.state.value}
157174
style={styles.spinner}
158-
color={"#000"}
159-
colorPress={"#FFF"}
160-
buttonTextColor={"#FFF"}
161-
buttonPressTextColor={"#000"}/>
175+
color={"#C4C4C4"}
176+
colorPress={"#F00"}
177+
buttonTextColor={"#000"}
178+
buttonPressTextColor={"#FFF"}/>
162179
</View>
163180
</ScrollView>
164181
);

0 commit comments

Comments
 (0)