-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
77 lines (72 loc) · 1.77 KB
/
App.tsx
File metadata and controls
77 lines (72 loc) · 1.77 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the UI Kitten TypeScript template
* https://github.com/akveo/react-native-ui-kitten
*
* Documentation: https://akveo.github.io/react-native-ui-kitten/docs
*
* @format
*/
import React from 'react';
import {
ImageProps,
ImageStyle,
StyleSheet,
} from 'react-native';
import {
ApplicationProvider,
Button,
Icon,
IconRegistry,
Layout,
Text,
} from 'react-native-ui-kitten';
import {
mapping,
light as theme,
} from '@eva-design/eva';
import { EvaIconsPack } from '@ui-kitten/eva-icons';
/**
* Use any valid `name` property from eva icons (e.g `github`, or `heart-outline`)
* https://akveo.github.io/eva-icons
*/
const HeartIcon = (style: ImageStyle): React.ReactElement<ImageProps> => (
<Icon {...style} name='heart'/>
);
const App = (): React.ReactFragment => (
<React.Fragment>
<IconRegistry icons={EvaIconsPack}/>
<ApplicationProvider mapping={mapping} theme={theme}>
<Layout style={styles.container}>
<Text style={styles.text} category='h1'>
Welcome to UI Kitten 😻
</Text>
<Text style={styles.text} category='s1'>
Start with editing App.js to configure your App
</Text>
<Text style={styles.text} appearance='hint'>
For example, try changing theme to Dark by simply changing an import
</Text>
<Button style={styles.likeButton} icon={HeartIcon}>
LIKE
</Button>
</Layout>
</ApplicationProvider>
</React.Fragment>
);
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
text: {
textAlign: 'center',
},
likeButton: {
marginVertical: 16,
},
});
export default App;