-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from fac20/fish-card
Fish card
- Loading branch information
Showing
4 changed files
with
89 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +0,0 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.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); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from "react"; | ||
|
||
const FishCard = ({ | ||
Genus, // | ||
Species, // | ||
Vulnerability, // stats | ||
Length, // stats | ||
Dangerous, // stats | ||
Electrogenic, // stats | ||
Comments, //- | ||
image, //- | ||
}) => { | ||
if (!Genus) { | ||
return <h3>...Loading</h3>; | ||
} | ||
return ( | ||
<article> | ||
<h2> | ||
{Genus} {Species} | ||
</h2> | ||
<img src={image} alt="fish pic" /> | ||
<fieldset> | ||
<legend>Stats</legend> | ||
<ul> | ||
<li> | ||
<span role="img" aria-label=""> | ||
⚠️ | ||
</span>{" "} | ||
Danger: {Dangerous}{" "} | ||
<span role="img" aria-label=""> | ||
⚠️ | ||
</span>{" "} | ||
</li> | ||
<li>Vulnerability: {Vulnerability}</li> | ||
<li>Length: {Length} mm</li> | ||
<li> | ||
<span role="img" aria-label=""> | ||
⚡ | ||
</span>{" "} | ||
Lightning magic: {Electrogenic} | ||
<span role="img" aria-label=""> | ||
⚡ | ||
</span> | ||
</li> | ||
</ul> | ||
</fieldset> | ||
<h3>Description:</h3> | ||
<p>{Comments}</p> | ||
</article> | ||
); | ||
}; | ||
|
||
export default FishCard; |