-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMovie.tsx
60 lines (56 loc) · 1.13 KB
/
Movie.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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import {StyleSheet, Text, View} from 'react-native';
function Movie(props: {
title: string;
genre: string;
time: string;
place: string;
}): JSX.Element {
return (
<View style={styles.wrapper}>
<View style={styles.movieInfo}>
<View style={styles.thumbnail} />
<View style={styles.movieNameAndGenre}>
<Text>{props.title}</Text>
<Text style={styles.subtitle}>{props.genre}</Text>
</View>
</View>
<View style={styles.eventInfo}>
<Text>{props.time}</Text>
<Text>{props.place}</Text>
</View>
</View>
);
}
const styles = StyleSheet.create({
wrapper: {
padding: 10,
flexDirection: 'row',
alignItems: 'center',
},
subtitle: {
color: 'grey',
},
movieNameAndGenre: {
marginLeft: 10,
},
thumbnail: {
width: 60,
height: 60,
backgroundColor: 'blue',
},
eventInfo: {
marginLeft: 'auto',
},
movieInfo: {
flexDirection: 'row',
alignItems: 'center',
},
});
export default Movie;