-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
53 lines (46 loc) · 1.22 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import {StyleSheet, View, Text} from 'react-native';
import CircularPicker from './CircularPickerNativeView';
type Props = {};
export default class App extends Component<Props> {
state = {
value: 0,
color: '#00EDE9'
};
onValueChange = ({nativeEvent}) => {
this.setState({value: nativeEvent.value});
}
onColorChange = ({nativeEvent}) => {
this.setState({color: nativeEvent.value});
}
render() {
return (
<View style={styles.container}>
<Text style={{color: this.state.color, margin: 50, fontSize: 64}}>
{this.state.value}
</Text>
<CircularPicker style={{height: 350, width: "100%"}}
onValueChange={this.onValueChange}
onColorChange={this.onColorChange}
max={100}
text="Volume"
colors={['#00EDE9', '#0087D9', '#8A1CC3']}/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#1a1650',
},
});