-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylesprops.css
95 lines (82 loc) · 1.61 KB
/
stylesprops.css
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
body {
font-family: sans-serif;
margin: 0 auto;
padding: 25px;
max-width: 400px;
min-width: 400px;
background-color: #dfe6e9;
text-align: center;
}
.heading {
text-align: center;
font-size: 2em;
color: #2d3436;
margin: 20px 0 30px;
}
.card {
border-radius: 25px;
position: relative;
padding: 25px 15px;
background-color: #81ecec;
margin: 50px 0;
height: 200px;
box-shadow: 0 2px 5px #ccc;
text-align: left;
}
.top {
border-radius: 25px 25px 0 0;
height: 100px;
width: 100%;
background-color: #00cec9;
position: absolute;
top: 0;
left: 0;
display: flex;
}
.name {
font-size: 2em;
color: #2d3436;
display: flex;
flex: 1;
margin: 10% 20px 0;
}
.card img {
margin: 30px 20px 0 0;
}
.circle-img {
border-radius: 50%;
border: 7px solid #fff;
width: 120px;
height: 120px;
}
.bottom {
margin-top: 120px;
}
.info {
margin: 20px 0;
color: #1a7e76;
}
import React from "react";
import ReactDOM from "react-dom";
import App from "./components/App";
import contacts from "./contacts";
function createCard(contact) {
return <App
key={contact.id}name={contact.name} img={contact.imgURL} tel={contact.phone} email ={contact.email}/>;
}
ReactDOM.render(
<div>
{contacts.map(createCard)}
{/* <h1 className="heading">My Contacts</h1>
<App
name="XYZ"
img="https://blackhistorywall.files.wordpress.com/2010/02/picture-device-independent-bitmap-119.jpg"
tel="123456"
email="xyz@gmail.com"
/>
<App
name={contacts[1].name}
img={contacts[1].imgURL}
tel={contacts[1].phone}
email="yzz@gmail.com"
/>