Skip to content

Instantly share code, notes, and snippets.

@Origho-precious
Created September 16, 2021 20:24
Show Gist options
  • Save Origho-precious/d7d4359ccd9bf8f624143f9779b1349f to your computer and use it in GitHub Desktop.
Save Origho-precious/d7d4359ccd9bf8f624143f9779b1349f to your computer and use it in GitHub Desktop.
AnimePill Component
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