|
@@ -0,0 +1,29 @@
|
|
1
|
+//@flow
|
|
2
|
+import React, { Component } from 'react';
|
|
3
|
+import { Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
4
|
+
|
|
5
|
+const styles = StyleSheet.create({
|
|
6
|
+ root: {
|
|
7
|
+ margin: 3,
|
|
8
|
+ paddingVertical: 4,
|
|
9
|
+ paddingHorizontal: 8,
|
|
10
|
+ color: '#36f',
|
|
11
|
+ borderWidth: 1,
|
|
12
|
+ borderColor: '#36f',
|
|
13
|
+ fontSize: 12,
|
|
14
|
+ },
|
|
15
|
+});
|
|
16
|
+
|
|
17
|
+export default class Btn extends Component<{
|
|
18
|
+ onPress: () => void,
|
|
19
|
+ label: string,
|
|
20
|
+}> {
|
|
21
|
+ render() {
|
|
22
|
+ const { onPress, label } = this.props;
|
|
23
|
+ return (
|
|
24
|
+ <TouchableOpacity onPress={onPress}>
|
|
25
|
+ <Text style={styles.root}>{label}</Text>
|
|
26
|
+ </TouchableOpacity>
|
|
27
|
+ );
|
|
28
|
+ }
|
|
29
|
+}
|