File tree 4 files changed +18
-1
lines changed
4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ const navQuery = `
65
65
sectionItems[]{
66
66
itemType,
67
67
"icon": icon.asset->url,
68
+ highlightBadge,
68
69
title,
69
70
description,
70
71
link,
@@ -90,6 +91,7 @@ const navQuery = `
90
91
sectionItems[]{
91
92
itemType,
92
93
"icon": icon.asset->url,
94
+ highlightBadge,
93
95
title,
94
96
description,
95
97
link,
Original file line number Diff line number Diff line change 104
104
display : initial;
105
105
}
106
106
}
107
+
108
+ .iconWrapper {
109
+ display : flex;
110
+ flex-direction : column;
111
+ row-gap : 8px ;
112
+ min-width : 35px ;
113
+ }
114
+
107
115
.dateText {
108
116
font-size : 14px ;
109
117
line-height : 18px ;
Original file line number Diff line number Diff line change 1
1
import { clsx } from "clsx" ;
2
2
3
3
import Link from "../Link" ;
4
+ import New from "./assets/new-badge.svg" ;
4
5
5
6
import styles from "./DropdownMenuItem.module.css" ;
6
7
import cn from "classnames" ;
7
8
export interface MenuItemProps {
8
9
itemType : string | "normal" | "image" ;
9
10
icon ?: string | null ;
11
+ highlightBadge ?: boolean | null ;
10
12
title ?: string | null ;
11
13
description ?: string | null ;
12
14
link : string | null ;
@@ -28,6 +30,7 @@ const DropdownMenuItem = ({
28
30
title,
29
31
link = "" ,
30
32
icon,
33
+ highlightBadge = false ,
31
34
description,
32
35
imageItem,
33
36
itemAmount,
@@ -39,7 +42,10 @@ const DropdownMenuItem = ({
39
42
className = { clsx ( styles . styledLink , ! description && styles . center ) }
40
43
href = { link }
41
44
>
42
- < img src = { icon || "" } width = { 35 } height = { 35 } alt = "" />
45
+ < div className = { styles . iconWrapper } >
46
+ < img src = { icon || "" } width = { 35 } height = { 35 } alt = "" />
47
+ { highlightBadge && < New /> }
48
+ </ div >
43
49
< div className = { styles . item } >
44
50
< p className = { styles . itemTitle } > { title } </ p >
45
51
{ description && < p className = { styles . description } > { description } </ p > }
You can’t perform that action at this time.
0 commit comments