Skip to content

Commit

Permalink
added some fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Pacurar committed Oct 3, 2021
1 parent 32d3f2e commit d9a5cd1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
19 changes: 15 additions & 4 deletions app/src/components/pokemon-list/pokemon-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,28 @@ const pokemonListStyle = css`
const pokemonStyle = css`
margin: 20px;
color: white;
width: 200px;
height: 300px;
width: 150px;
height: 210px;
border: 1px solid grey;
`;

const pokemonNameStyle = css`
font-size: 24px;
font-weight: bold;
`;

const PokemonDetails = ({ details }) => {
const { color, name } = details;
const { color, id, name, sprites, types } = details;

return (
<div css={pokemonStyle} style={{ background: color }}>
<h2>{name}</h2>
<div css={pokemonNameStyle}>{name}</div>
<div>{id}</div>
{sprites?.front_default && (
<img src={sprites.front_default} alt="missing pic" />
)}
<div>Types</div>
{types.map(({ type }) => type.name).join(", ")}
</div>
);
};
Expand Down
1 change: 1 addition & 0 deletions app/src/components/pokemon/pokemon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Pokemon = () => {
return (
<div>
<h1>{name}</h1>
<h6>{id}</h6>
{abilities?.length && (
<>
<div>
Expand Down

0 comments on commit d9a5cd1

Please sign in to comment.