/
CannyFooter.tsx
49 lines (44 loc) · 1.23 KB
/
CannyFooter.tsx
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
import React from 'react';
import { StyleSheet, Text, View, StyleProp, ViewStyle } from 'react-native';
import * as Linking from 'expo-linking';
import Colors from '../constants/Colors';
import Button from './Button';
const cannyUrl = `https://expo.canny.io/feature-requests`;
export default class CannyFooter extends React.Component<{ style?: StyleProp<ViewStyle> }> {
onPress = () => {
Linking.openURL(cannyUrl);
};
render() {
return (
<View style={[styles.container, this.props.style]}>
<Text style={styles.text}>Missing something?</Text>
<Button style={styles.button} onPress={this.onPress} title="Open a Canny!" />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'space-between',
flexDirection: 'row',
borderTopColor: Colors.border,
borderTopWidth: StyleSheet.hairlineWidth,
paddingVertical: 12,
marginTop: 8,
},
button: {
alignItems: 'center',
justifyContent: 'center',
borderRadius: 3,
paddingVertical: 4,
paddingHorizontal: 12,
backgroundColor: Colors.tintColor,
},
text: {
color: Colors.secondaryText,
fontWeight: '700',
fontSize: 16,
marginVertical: 12,
},
});