-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
71 lines (68 loc) · 1.49 KB
/
App.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import {StatusBar} from 'expo-status-bar';
import React, {useState} from 'react';
import {StyleSheet, Image} from 'react-native';
import {
Provider as PaperProvider,
DefaultTheme,
FAB,
Chip,
Banner,
} from 'react-native-paper';
export default function App() {
const [visible, setVisible] = useState(true);
return (
<PaperProvider theme={DefaultTheme}>
<Banner
visible={visible}
actions={[
{
label: 'Fix it',
onPress: () => setVisible(false),
},
{
label: 'Learn more',
onPress: () => setVisible(false),
},
]}
icon={({size}) => (
<Image
source={{
uri: 'https://avatars3.githubusercontent.com/u/17571969?s=400&v=4',
}}
style={{
width: size,
height: size,
}}
/>
)}
>
There was a problem processing a transaction on your credit card.
</Banner>
<FAB
style={styles.fab}
small
icon="plus"
onPress={() => console.log('Pressed')}
/>
<Chip
style={styles.chip}
icon="information"
onPress={() => console.log('Pressed')}
>
Example Chip
</Chip>
<StatusBar style="auto" />
</PaperProvider>
);
}
const styles = StyleSheet.create({
fab: {
position: 'absolute',
margin: 16,
right: 0,
bottom: 0,
},
chip: {
margin: 32,
},
});