This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from navikt/dev
Prodsette
- Loading branch information
Showing
4 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/components/paneler/innhold/personaliaV2/statsborgerskapinfo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { isArray, isString } from '@craco/craco/dist/lib/utils'; | ||
import InformasjonsbolkListe from '../../../felles/informasjonsbolk-liste'; | ||
import { formateStringInUpperAndLowerCase } from '../../../../utils'; | ||
import InformasjonsbolkEnkel from '../../../felles/informasjonsbolk-enkel'; | ||
import React from 'react'; | ||
|
||
function StatsborgerskapInfo(props: { stasborgerskapData: string[] | string }) { | ||
const headerVerdi = 'Statsborgerskap'; | ||
const statsborgerskapList = (statsborgerskapListData: string[]) => | ||
statsborgerskapListData.map(statsborgerskap => formateStringInUpperAndLowerCase(statsborgerskap)); | ||
|
||
return ( | ||
<div> | ||
{isArray(props.stasborgerskapData) && ( | ||
<InformasjonsbolkListe header={headerVerdi} list={statsborgerskapList(props.stasborgerskapData)} /> | ||
)} | ||
{isString(props.stasborgerskapData) && ( | ||
<InformasjonsbolkEnkel | ||
header={headerVerdi} | ||
value={formateStringInUpperAndLowerCase(props.stasborgerskapData)} | ||
childclassname="innrykk" | ||
/> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default StatsborgerskapInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters