Created
September 16, 2021 20:24
-
-
Save Origho-precious/d7d4359ccd9bf8f624143f9779b1349f to your computer and use it in GitHub Desktop.
AnimePill Component
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
import { Link } from "react-router-dom"; | |
import styled from "styled-components"; | |
const AnimePill = ({ anime, color }) => { | |
return ( | |
<StyledPill style={{ background: color }}> | |
<Link to={`/anime/${anime}`}>{anime}</Link> | |
</StyledPill> | |
); | |
}; | |
const StyledPill = styled.div` | |
border-radius: 999px; | |
& a { | |
display: block; | |
text-decoration: none; | |
color: #333; | |
padding: 1rem 2rem; | |
} | |
`; | |
export default AnimePill; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment