1
- import { Box , Table } from '@navikt/ds-react' ;
1
+ import { BodyShort , Box , Label , Table } from '@navikt/ds-react' ;
2
2
import styles from './barn.module.css' ;
3
3
import type { Barn } from './types/Barn' ;
4
4
@@ -14,20 +14,34 @@ export const BarnPanel = ({ barn }: Props) => {
14
14
< Table . Header >
15
15
< Table . Row >
16
16
< Table . HeaderCell scope = "col" className = { styles . firstHeaderCell } >
17
- Navn
17
+ < Label size = "small" > Navn</ Label >
18
18
</ Table . HeaderCell >
19
- < Table . HeaderCell scope = "col" > Fødselsdato</ Table . HeaderCell >
20
- { harBarnMedDødsdato && < Table . HeaderCell scope = "col" > Dødsdato</ Table . HeaderCell > }
19
+ < Table . HeaderCell scope = "col" >
20
+ < Label size = "small" > Fødselsdato</ Label >
21
+ </ Table . HeaderCell >
22
+ { harBarnMedDødsdato && (
23
+ < Table . HeaderCell scope = "col" >
24
+ < Label size = "small" > Dødsdato</ Label >
25
+ </ Table . HeaderCell >
26
+ ) }
21
27
</ Table . Row >
22
28
</ Table . Header >
23
29
< Table . Body >
24
30
{ barn . map ( ( { navn, fødselsdato, dødsdato } , index ) => {
25
31
const isLastRow = index === barn . length - 1 ;
26
32
return (
27
33
< Table . Row key = { navn } className = { isLastRow ? styles . lastRow : '' } >
28
- < Table . DataCell className = { styles . firstHeaderCell } > { navn } </ Table . DataCell >
29
- < Table . DataCell > { fødselsdato } </ Table . DataCell >
30
- { harBarnMedDødsdato && < Table . DataCell > { dødsdato } </ Table . DataCell > }
34
+ < Table . DataCell className = { styles . firstHeaderCell } >
35
+ < BodyShort size = "small" > { navn } </ BodyShort >
36
+ </ Table . DataCell >
37
+ < Table . DataCell >
38
+ < BodyShort size = "small" > { fødselsdato } </ BodyShort >
39
+ </ Table . DataCell >
40
+ { harBarnMedDødsdato && (
41
+ < Table . DataCell >
42
+ < BodyShort size = "small" > { dødsdato } </ BodyShort >
43
+ </ Table . DataCell >
44
+ ) }
31
45
</ Table . Row >
32
46
) ;
33
47
} ) }
0 commit comments