Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import React from "react";

import { mockPokemonData } from "./mock/pokeData";
import PokeCard from "./components/PokeCard";
import "./styles.css";

export default function App() {
const { sprites, name, video } = mockPokemonData;
return (
<div className="App">
<h1>Welcome to your second mini challenge!</h1>
<div className="pokemonsContainer">
<PokeCard sprites={sprites} name={name} video={video} />
</div>
</div>
);
}
18 changes: 18 additions & 0 deletions src/components/PokeCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";

export default function PokeCard({ sprites, name, video }) {
return (
<div className="pokeCard">
<h1>{name}</h1>
<div className="pokemonImages">
<img src={sprites.front_default} alt="Default" />
<img src={sprites.front_shiny} alt="Shiny" />
</div>
<div className="pokemonControls">
<a href={video} target="blank">
Go to the video!
</a>
</div>
</div>
);
}
41 changes: 41 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,44 @@
font-family: sans-serif;
text-align: center;
}

.pokeCard {
border: solid #ddd;
border-width: 1rem 0.5rem 2rem;
padding: 1rem;
margin: 1rem;
background-color: #18bfdc;
border-radius: 10px 10px 0px 30px;
}

.pokemonControls {
padding: 1rem;
}

.pokemonControls a {
color: white;
}

.pokemonControls a:hover {
transition: all 0.5s;
color: #990000;
}

.pokemonsContainer {
width: 80%;
margin: auto;
display: flex;
justify-content: center;
flex-wrap: wrap;
}

.pokemonName {
width: 100%;
}

.pokemonImages img {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👌🏽 that you took care of the styling

border-radius: 50%;
background-color: white;
border: 1px solid #eee;
margin: 0.5rem;
}