Skip to content

Commit c073171

Browse files
committed
frontend for tags
1 parent 04a1ed1 commit c073171

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

packages/nextjs/src/components/_common/headers/headerWithParent/HeaderWithParent.module.scss

+16
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,20 @@
1515
font-size: 40px;
1616
line-height: 52px;
1717
}
18+
19+
.tagsList {
20+
display: flex;
21+
list-style: none;
22+
padding: 0;
23+
align-items: center;
24+
gap: 5px;
25+
margin: 0;
26+
flex-wrap: wrap;
27+
28+
.tag {
29+
background-color: var(--a-surface-neutral-subtle);
30+
border-radius: 2px;
31+
padding: 3px 6px;
32+
}
33+
}
1834
}

packages/nextjs/src/components/_common/headers/headerWithParent/HeaderWithParent.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ type Props = {
1010
};
1111
textAboveTitle?: string;
1212
className?: string;
13+
tags?: string[];
1314
};
1415

15-
export const HeaderWithParent = ({ contentProps, textAboveTitle, className }: Props) => {
16+
export const HeaderWithParent = ({ contentProps, textAboveTitle, className, tags }: Props) => {
1617
const { data } = contentProps;
1718

1819
return (
@@ -23,6 +24,15 @@ export const HeaderWithParent = ({ contentProps, textAboveTitle, className }: Pr
2324
<Heading level="1" size="large" spacing className={style.header}>
2425
{data.title}
2526
</Heading>
27+
{tags && (
28+
<ul className={style.tagsList}>
29+
{tags.map((tag, index) => (
30+
<li key={index} className={style.tag}>
31+
{tag}
32+
</li>
33+
))}
34+
</ul>
35+
)}
2636
</div>
2737
);
2838
};

0 commit comments

Comments
 (0)