7
7
SystemLinks ,
8
8
} from "shared/types/menu" ;
9
9
import { NAVIGATION_LINKS } from "frontend/lib/routing/links" ;
10
- import { systemIconToSVG } from "shared/constants/Icons" ;
11
10
import { ChevronRight } from "react-feather" ;
12
11
import { SYSTEM_COLORS } from "frontend/design-system/theme/system" ;
13
12
import { Typo } from "frontend/design-system/primitives/Typo" ;
@@ -16,6 +15,7 @@ import { Stack } from "frontend/design-system/primitives/Stack";
16
15
import { useThemeColorShade } from "frontend/design-system/theme/useTheme" ;
17
16
import { useNavigationStack } from "frontend/lib/routing/useNavigationStack" ;
18
17
import { ActionIntegrations } from "shared/types/actions" ;
18
+ import { SystemIcon } from "frontend/design-system/Icons/System" ;
19
19
import { PORTAL_SYSTEM_LINK_CONFIG_LINKS } from "./portal" ;
20
20
21
21
const SYSTEM_LINKS_CONFIG_MAP : Record <
@@ -71,24 +71,14 @@ const LeftSideNavMenuListAnchor = styled.a<{
71
71
}
72
72
` ;
73
73
74
- const IconRoot = styled . span < { $isFullWidth : boolean } > `
75
- color: ${ SYSTEM_COLORS . white } ;
76
- width: 20px;
77
- height: 20px;
78
- display: inline-block;
79
- svg {
80
- vertical-align: initial;
81
- }
82
- ` ;
83
-
84
74
const LeftSideNavMenu = styled . ul < { } > `
85
75
padding: 0;
86
76
margin-bottom: 0;
87
77
` ;
88
78
89
79
const NavLabel = styled ( Typo . XS ) < { $isFullWidth : boolean } > `
90
80
color: ${ SYSTEM_COLORS . white } ;
91
- margin-left: 20px ;
81
+ margin-left: 8px ;
92
82
transition: all 0.3s;
93
83
${ ( props ) =>
94
84
! props . $isFullWidth &&
@@ -173,13 +163,8 @@ export function RenderNavigation({
173
163
{ navigation . map ( ( { title, icon, type, link, id, children } ) => {
174
164
const isActive = activeItem [ depth ] === id ;
175
165
176
- const iconComponent = (
177
- < IconRoot
178
- $isFullWidth = { isFullWidth }
179
- dangerouslySetInnerHTML = { {
180
- __html : systemIconToSVG ( icon , isActive ? 2 : 1 ) ,
181
- } }
182
- />
166
+ const menuIcon = depth === 1 && (
167
+ < SystemIcon strokeWidth = { isActive ? 2 : 1 } icon = { icon } size = { 20 } />
183
168
) ;
184
169
185
170
return (
@@ -200,7 +185,7 @@ export function RenderNavigation({
200
185
setActiveItem ( depth , isActive ? "" : id ) ;
201
186
} }
202
187
>
203
- { iconComponent }
188
+ { menuIcon }
204
189
{ isFullWidth && (
205
190
< Stack justify = "space-between" spacing = { 0 } align = "center" >
206
191
< NavLabel ellipsis $isFullWidth = { isFullWidth } >
@@ -241,7 +226,7 @@ export function RenderNavigation({
241
226
}
242
227
hoverColor = { getBackgroundColor ( "primary-color" , 45 ) }
243
228
>
244
- { icon && iconComponent }
229
+ { icon && menuIcon }
245
230
< NavLabel ellipsis $isFullWidth = { isFullWidth } >
246
231
{ title }
247
232
</ NavLabel >
0 commit comments