-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hotelcard.js
78 lines (61 loc) · 2.21 KB
/
Hotelcard.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
77
const { Card, makeStyles, CardActionArea, CardActions, CardContent, CardMedia, Button, Typography, Icon, Paper, Grid } = window['MaterialUI'];
class Hotelcard extends React.Component {
render() {
const {
slug,
name,
photo,
description,
availabilityFrom,
availabilityTo,
rooms,
city,
country,
price,
} = this.props.hotel
return (
<Card width="50">
<CardActionArea>
<Grid Item xs={12}>
<Paper className="info-paper" elevation={0}>
<img src={photo} />
</Paper>
</Grid>
<CardContent>
<Typography gutterBottom variant="h5" component="h2">
{name}
</Typography>
<Typography variant="body2" color="textSecondary" component="p">
{description}
</Typography>
</CardContent>
<Grid Item xs={12}>
<Paper className="info-paper" style={{display: "flex", alignItems: "center"}} elevation={2}>
<Icon className="next-to-icon">location_on</Icon>{city}, {country}
</Paper>
</Grid>
<Grid container className="limbo">
<Grid Item xs={7}>
<Paper className="info-paper" style={{display: "flex", alignItems: "center"}} elevation={2}>
<Icon className="next-to-icon">local_hotel</Icon><span>{rooms} {rooms > 1 ? "Habitaciones" : "Habitación"}</span>
</Paper>
</Grid>
<Grid Item xs={5}>
<Paper className="info-paper" elevation={2}>
<Icon className="money">attach_money</Icon>
<Icon className="money" color={price > 1 ? "black" : "disabled"}>attach_money</Icon>
<Icon className="money" color={price > 2 ? "black" : "disabled"}>attach_money</Icon>
<Icon className="money" color={price > 3 ? "black" : "disabled"}>attach_money</Icon>
</Paper>
</Grid>
</Grid>
</CardActionArea>
<CardActions>
<Button variant="contained" color="primary" className="reservar">
Reservar
</Button>
</CardActions>
</Card>
)
}
}