diff --git a/src/App.css b/src/App.css index 74b5e05..eddfe90 100644 --- a/src/App.css +++ b/src/App.css @@ -1,38 +1,75 @@ .App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; + *{ + font-family: sans-serif; + } + thead{ + font-size: 25px; + } + tr{ + text-align: center; + } } - -@media (prefers-reduced-motion: no-preference) { .App-logo { - animation: App-logo-spin infinite 20s linear; + height: 40vmin; + pointer-events: none; } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); + + @media (prefers-reduced-motion: no-preference) { + .App-logo { + animation: App-logo-spin infinite 20s linear; + } } - to { - transform: rotate(360deg); + + .App-header { + background-color: #282c34; + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: calc(10px + 2vmin); + color: white; + } + tr img{ + width:100px; + height:100px; + border-radius: 20px; + } + div > button{ + padding:10px 15px; + background-color:teal; + border-radius:10px; + color:white; + font-size: 20px; + margin: 10px; + border: none; + } + + .App-link { + color: #61dafb;} + div > button:hover{ + background-color: tomato; + } + td button{ + padding:8px 10px; + border: 2px solid cornflowerblue; + border-radius: 10px; + } + td button:hover{ + background-color: cornflowerblue; + color: white; + } + + @keyframes App-logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + }} + tr:hover{ + background-color:rgb(248, 228, 131); + } + table{ + margin: 20px auto; } -} diff --git a/src/App.js b/src/App.js index 3784575..ad2caaf 100644 --- a/src/App.js +++ b/src/App.js @@ -1,5 +1,55 @@ -import logo from './logo.svg'; +// import logo from './logo.svg'; import './App.css'; +import contacts from "./contacts.json"; +import React, { useState } from 'react'; + + + +function contacts () => { + const [contacts, setContacts] = useState([ + { + "name": "Idris Elba", + "pictureUrl": "https://image.tmdb.org/t/p/w500/d9NkfCwczP0TjgrjpF94jF67SK8.jpg", + "popularity": 11.622713, + "id": "11731993-0604-4bee-80d5-67ad845d0a38", + "wonOscar": false, + "wonEmmy": false + } + { + "name": "Johnny Depp", + "pictureUrl": "https://image.tmdb.org/t/p/w500/kbWValANhZI8rbWZXximXuMN4UN.jpg", + "popularity": 15.656534, + "id": "7dad00f7-3949-477d-a7e2-1467fd2cfc06", + "wonOscar": false, + "wonEmmy": false + } + { + "name": "Monica Bellucci", + "pictureUrl": "https://image.tmdb.org/t/p/w500/qlT4904d8oi2NIs28RrgnIZDFZB.jpg", + "popularity": 16.096436, + "id": "0ad5e441-3084-47a1-9e9b-b917539bba71", + "wonOscar": false, + "wonEmmy": false + } + { + "name": "Gal Gadot", + "pictureUrl": "https://image.tmdb.org/t/p/w500/34kHAyBaBhq2kUrmhM15paEBuuI.jpg", + "popularity": 10.049256, + "id": "b497e3c4-50bb-4ae2-912f-eb36802c5bc2", + "wonOscar": false, + "wonEmmy": false + } + { + "name": "Ian McKellen", + "pictureUrl": "https://image.tmdb.org/t/p/w500/coWjgMEYJjk2OrNddlXCBm8EIr3.jpg", + "popularity": 10.070132, + "id": "0067ae32-97b6-4431-898e-eb1c10150abb", + "wonOscar": false, + "wonEmmy": false + } + ]); +} + function App() { return ( @@ -16,10 +66,32 @@ function App() { rel="noopener noreferrer" > Learn React - - + + + +
+

Contact List

+ + + + + + + + + + {contacts.map(contact => ( + + + + + + ))} + +
PictureNamePopularity
+ {contact.name} + {contact.name}{contact.popularity}
); } - export default App;