Skip to content

Commit dfe7ffc

Browse files
πŸ’„ feat(components/shared): new Chip component
1 parent 462dae1 commit dfe7ffc

File tree

3 files changed

+18
-37
lines changed

3 files changed

+18
-37
lines changed

β€Žsrc/components/pages/posts/all-posts-section-item.tsxβ€Ž

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { BlogEntry } from 'services/posts-content-service';
77
import { formatDate } from 'utils/date';
88

99
import Link from 'components/shared/link';
10-
import Tag from 'components/shared/tag';
1110

1211
/*~
1312
* TYPES
@@ -41,12 +40,6 @@ const AllPostsSectionItem: FunctionComponent<
4140
{language === 'pt' ? `πŸ‡§πŸ‡· β€’ ${title}` : `${title}`}
4241
</Link>
4342
</h2>
44-
{/* TODO: Move this back once we have tags. */}
45-
{/* <div className="flex flex-wrap gap-3 my-2">
46-
{tags.map((tag) => (
47-
<Tag key={tag} text={tag} />
48-
))}
49-
</div> */}
5043
<div className="prose max-w-none text-gray-500 dark:prose-dark dark:text-gray-400">
5144
{summary}
5245
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { FunctionComponent, PropsWithChildren } from 'react';
2+
3+
/*~
4+
* COMPONENT
5+
*/
6+
7+
const Chip: FunctionComponent<PropsWithChildren<{}>> = ({ children }) => {
8+
return (
9+
<span className="no-underline relative inline-block text-sm font-medium text-blue-700 group mr-4">
10+
<span className="absolute inset-0 transition-transform translate-x-0.5 translate-y-0.5 bg-blue-700 group-hover:translate-y-0 group-hover:translate-x-0"></span>
11+
<em className="relative block px-2 py-1 bg-white border border-current">
12+
{children}
13+
</em>
14+
</span>
15+
);
16+
};
17+
18+
export default Chip;

β€Žsrc/components/shared/tag.tsxβ€Ž

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

0 commit comments

Comments
Β (0)