-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
76 lines (71 loc) · 1.56 KB
/
App.js
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
import React, { Component } from "react";
import { Image, StyleSheet, Text, View } from "react-native";
const styles = StyleSheet.create({
bubble: {
alignSelf: "flex-start",
backgroundColor: "white",
borderRadius: 5,
elevation: 2,
padding: 16,
marginBottom: 8
},
bubbles: {
flex: 1
},
container: {
backgroundColor: "lightgray",
flex: 1,
paddingTop: 100
},
defaultBubble: {
alignItems: "flex-end",
flexDirection: "row",
paddingHorizontal: 16
},
profile: {
backgroundColor: "white",
borderRadius: 25,
elevation: 2,
height: 50,
marginRight: 8,
marginBottom: 8,
width: 50
},
tail: {
elevation: 2,
position: "absolute",
left: -11,
bottom: 10
},
tailImage: {
height: 12,
width: 12
}
});
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<View style={styles.defaultBubble}>
<View style={styles.profile} />
<View style={styles.bubbles}>
<View style={styles.bubble}>
<Text>Welcome to React Native!</Text>
</View>
<View style={styles.bubble}>
<Text>
This is an attached bubble. Attached to the top bubble.
</Text>
</View>
<View style={styles.tail}>
<Image
source={require("./tail_white_shadow.png")}
style={styles.tailImage}
/>
</View>
</View>
</View>
</View>
);
}
}