-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathApp.tsx
More file actions
53 lines (49 loc) · 1.28 KB
/
App.tsx
File metadata and controls
53 lines (49 loc) · 1.28 KB
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
import { Platform, Pressable, StatusBar, StyleSheet, Text, View } from 'react-native';
import { ReactNativeLegal } from 'react-native-legal';
const BUTTON_BACKGROUND_COLOR = '#8232ff';
const BUTTON_FONT_COLOR = '#FFF';
const BUTTON_RIPPLE_COLOR = '#8232ffba';
export default function App() {
function launchNotice() {
ReactNativeLegal.launchLicenseListScreen('Licences');
}
return (
<View style={styles.container}>
<Pressable
accessibilityRole="button"
android_ripple={{
color: BUTTON_RIPPLE_COLOR,
foreground: true,
}}
onPress={launchNotice}
style={({ pressed }) => [styles.button, pressed && styles.pressed]}
>
<Text style={styles.label}>Tap to see list of OSS libraries</Text>
</Pressable>
<StatusBar backgroundColor="transparent" barStyle="dark-content" translucent />
</View>
);
}
const styles = StyleSheet.create({
button: {
backgroundColor: BUTTON_BACKGROUND_COLOR,
borderRadius: 20,
overflow: 'hidden',
padding: 20,
},
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
label: {
color: BUTTON_FONT_COLOR,
fontSize: 20,
},
pressed: {
opacity: Platform.select({
android: 1,
default: 0.4,
}),
},
});