-
Notifications
You must be signed in to change notification settings - Fork 11
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 #164 from Web-Dev-Path/feature/add-link-to-tags
Add Links to Blog Tags
- Loading branch information
Showing
7 changed files
with
71 additions
and
42 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
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 |
---|---|---|
@@ -1,7 +1,25 @@ | ||
import styles from '@/styles/Blog.module.scss'; | ||
import Link from 'next/link'; | ||
import styled from 'styled-components'; | ||
|
||
const Tag = ({ text }) => { | ||
return <div className={styles.tag}>{text}</div>; | ||
}; | ||
export const TagContainer = styled.div` | ||
display: flex; | ||
flex-wrap: wrap; | ||
max-height: 12rem; | ||
overflow: hidden; | ||
gap: 0.5rem; | ||
margin-bottom: -1rem; | ||
a { | ||
text-decoration: none; | ||
} | ||
`; | ||
|
||
const TagLink = styled(Link)` | ||
background-color: #8cd5e8; | ||
padding: 0.5rem 1rem; | ||
border-radius: 2rem; | ||
font-weight: bold; | ||
`; | ||
|
||
export default Tag; | ||
export const Tag = ({ text }) => { | ||
return <TagLink href={`/blog/category/${text}`}>{text}</TagLink>; | ||
}; |
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
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