-
Notifications
You must be signed in to change notification settings - Fork 1
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 #47 from route06inc/implement-post-tags
feat: Implement post tags
- Loading branch information
Showing
8 changed files
with
93 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,7 @@ | |
|
||
.right { | ||
width: 274px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--spacing-10, 40px); | ||
} |
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
20 changes: 20 additions & 0 deletions
20
frontend/apps/service-site/src/features/posts/components/PostTags/PostTags.module.css
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.title { | ||
display: inline-block; | ||
font-family: var(--message-font, Montserrat); | ||
font-size: var(--font-size-6, 16px); | ||
font-weight: 600; | ||
line-height: 1.2; | ||
color: var(--link-default, #bebfc1); | ||
height: 24px; | ||
padding: 1px 0; | ||
gap: var(--spacing-1, 4px); | ||
} | ||
|
||
.list { | ||
margin-top: var(--spacing-5, 20px); | ||
display: flex; | ||
flex-direction: row; | ||
gap: var(--spacing-4, 16px); | ||
flex-wrap: wrap; | ||
row-gap: var(--spacing-3, 12px); | ||
} |
25 changes: 25 additions & 0 deletions
25
frontend/apps/service-site/src/features/posts/components/PostTags/PostTags.stories.tsx
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
import type { ComponentProps } from 'react' | ||
import { PostTags } from './PostTags' | ||
|
||
type Props = ComponentProps<typeof PostTags> | ||
const StoryComponent = (props: Props) => { | ||
return <PostTags {...props}>Categories</PostTags> | ||
} | ||
|
||
export default { | ||
component: StoryComponent, | ||
} satisfies Meta<typeof StoryComponent> | ||
|
||
export const Default: StoryObj<typeof StoryComponent> = { | ||
args: { | ||
tags: [ | ||
{ name: 'No-Code' }, | ||
{ name: 'Technology' }, | ||
{ name: 'DX' }, | ||
{ name: 'Innovation' }, | ||
{ name: 'Startups' }, | ||
], | ||
}, | ||
} |
22 changes: 22 additions & 0 deletions
22
frontend/apps/service-site/src/features/posts/components/PostTags/PostTags.tsx
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Badge } from '@/components/Badge' | ||
import type { PropsWithChildren } from 'react' | ||
import styles from './PostTags.module.css' | ||
|
||
type Props = PropsWithChildren<{ | ||
tags: Array<{ name: string }> | ||
}> | ||
|
||
export const PostTags = ({ tags }: Props) => { | ||
return ( | ||
<div> | ||
<p className={styles.title}>Tags</p> | ||
<ul className={styles.list}> | ||
{tags.map((tag) => ( | ||
<li key={tag.name}> | ||
<Badge type="outline">{tag.name}</Badge> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
frontend/apps/service-site/src/features/posts/components/PostTags/index.ts
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './PostTags' |
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