Skip to content

Commit 4d6c353

Browse files
Merge pull request #252 from Web-Dev-Path/Refactor/to-scss-blog-tag
Refactor/to scss blog tag
2 parents ff32287 + 876a82c commit 4d6c353

5 files changed

Lines changed: 16 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
163163
- ButtonLink
164164
- SubmitButton
165165
- AuthorBio
166+
- BlogTag
166167
- PostContent
167168
- SearchBar
168169
- BlogPostsContainer
169170
- RevealContentContainer
170171
- Member
171172
- Container
172-
173173
- Updated ContactUsForm's checkbox wrapper from div to label to enhance its accessibility
174174
- Updated SearchInput width to 100% for better styling
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.tagLink {
2+
display: inline-block;
3+
padding: 0.5rem 1rem;
4+
background-color: var(--color-light-bg);
5+
border-radius: 2rem;
6+
font-weight: bold;
7+
}

components/blog/Tag/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import S from './styles';
1+
import styles from './Tag.module.scss';
2+
import Link from 'next/link';
23

34
export const Tag = ({ text }) => {
4-
return <S.TagLink href={`/blog/category/${text}`}>{text}</S.TagLink>;
5+
return (
6+
<Link href={`/blog/category/${text}`} className={styles.tagLink}>
7+
{text}
8+
</Link>
9+
);
510
};

components/blog/Tag/styles.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

styles/themes.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
--color-dark-grey: #9ba39d;
77
--color-grey: #d9d9d9;
88
--color-white: #ffffff;
9+
--color-light-bg: #8cd5e8;
910
--color-primary-content: #292929;
1011
--color-transparent: transparent;
1112
--color-box-shadow: rgba(0, 0, 0, 0.08);

0 commit comments

Comments
 (0)