1
1
import React from 'react' ;
2
+ import {
3
+ BriefcaseClockIcon ,
4
+ CalendarIcon ,
5
+ FolderFileIcon ,
6
+ TasklistStartIcon ,
7
+ WalletIcon ,
8
+ } from '@navikt/aksel-icons' ;
2
9
import { Header } from 'components/_common/headers/Header' ;
3
10
import { EditorHelp } from 'components/_editor-only/editor-help/EditorHelp' ;
4
11
import { LinkPanelNavnoSimple } from 'components/_common/linkpanel/LinkPanelNavnoSimple/LinkPanelNavnoSimple' ;
5
12
import { PartComponentProps , PartType } from 'types/component-props/parts' ;
6
- import { Icon } from 'types/content-props/pictograms ' ;
13
+ import style from './FrontpagePersonShortcutsPart.module.scss ' ;
7
14
8
15
type Shortcut = {
9
16
target : {
10
17
_path : string ;
11
18
displayName : string ;
12
19
data : {
13
20
url ?: string ;
14
- icon ?: Icon ;
15
21
title ?: string ;
16
22
} ;
17
23
} ;
18
24
customTitle : string ;
19
- customIcon ?: Icon ;
20
25
} ;
21
26
22
27
export type PartConfigFrontpagePersonShortcuts = {
@@ -34,13 +39,13 @@ export const FrontpagePersonShortcutsPart = ({
34
39
}
35
40
36
41
return (
37
- < div >
42
+ < div className = { style . personShortcuts } >
38
43
{ sectionTitle && (
39
- < Header size = "large" level = "2" >
44
+ < Header size = "large" level = "2" className = { style . header } >
40
45
{ sectionTitle }
41
46
</ Header >
42
47
) }
43
- < ul >
48
+ < ul className = { style . list } >
44
49
{ shortcuts . map ( ( item ) => {
45
50
const { target, customTitle } = item ;
46
51
if ( ! target ?. data ) {
@@ -49,14 +54,33 @@ export const FrontpagePersonShortcutsPart = ({
49
54
50
55
const href = target . data . url || target . _path ;
51
56
const title = customTitle || target . data . title || target . displayName ;
52
- // const illustration = customIllustration || target.data.illustration;
53
57
54
58
return (
55
- < li key = { title } >
59
+ < li key = { title } className = { style . listItem } >
56
60
< LinkPanelNavnoSimple
57
61
href = { href }
58
62
analyticsLinkGroup = { title }
59
- // icon={<IllustrationStatic illustration={illustration} />}
63
+ className = { style . link }
64
+ //Hardkoder ikonene istedenfor å legge de inn i Enonic da det
65
+ //kun er her vi bruker ikoner
66
+ icon = {
67
+ < >
68
+ { title === 'Saksbehandlingstider' && (
69
+ < BriefcaseClockIcon title = "Koffert med klokke" />
70
+ ) }
71
+ { title === 'Utbetalingsdatoer' && (
72
+ < CalendarIcon title = "Kalender" />
73
+ ) }
74
+ { title === 'Satser' && < WalletIcon title = "Lommebok" /> }
75
+ { title === 'Søknad og skjema' && (
76
+ < TasklistStartIcon title = "Oppgaveliste start" />
77
+ ) }
78
+ { title === 'Ettersendelse' && (
79
+ < FolderFileIcon title = "Mappefil" />
80
+ ) }
81
+ </ >
82
+ }
83
+ iconClassname = { style . icon }
60
84
>
61
85
{ title }
62
86
</ LinkPanelNavnoSimple >
0 commit comments