-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IS-3007: Fjernet accordion ifm. visning av flere opplysning fra behan…
…dler, samt refaktorert slik at elementer på siden følger samme stil
- Loading branch information
1 parent
9b5d489
commit 12f3508
Showing
36 changed files
with
430 additions
and
696 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
interface FieldReadOnlyProps { | ||
label: string; | ||
children: ReactNode; | ||
className?: string; | ||
classNameLabel?: string; | ||
} | ||
|
||
export function FieldReadOnly(fieldReadOnlyProps: FieldReadOnlyProps) { | ||
const { | ||
label, | ||
className = "", | ||
classNameLabel = "", | ||
children, | ||
} = fieldReadOnlyProps; | ||
|
||
return ( | ||
<div | ||
className={`navds-body-short--small inline-table w-full mb-5 ${className}`} | ||
> | ||
<div className={`navds-label mt-0 mb-1 ${classNameLabel}`}>{label}</div> | ||
{children} | ||
</div> | ||
); | ||
} |
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
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
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
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
27 changes: 27 additions & 0 deletions
27
src/sider/sykmeldinger/sykmelding/sykmeldingOpplysninger/Nokkelopplysning.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,27 @@ | ||
import React, { ReactNode } from "react"; | ||
import { FieldReadOnly } from "@/components/FieldReadOnly"; | ||
|
||
interface NokkelopplysningProps { | ||
label: string; | ||
children?: ReactNode; | ||
className?: string; | ||
isSubopplysning?: boolean; | ||
} | ||
|
||
export function Nokkelopplysning(nokkelopplysningProps: NokkelopplysningProps) { | ||
const { | ||
label, | ||
children, | ||
className = "", | ||
isSubopplysning = false, | ||
} = nokkelopplysningProps; | ||
return ( | ||
<FieldReadOnly | ||
label={label} | ||
className={`${className} ${isSubopplysning ? "ml-6" : ""}`} | ||
classNameLabel={"nokkelopplysning__tittel"} | ||
> | ||
{children} | ||
</FieldReadOnly> | ||
); | ||
} |
17 changes: 17 additions & 0 deletions
17
src/sider/sykmeldinger/sykmelding/sykmeldingOpplysninger/OpplysningListItem.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,17 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
interface OpplysningListItemProps { | ||
children?: ReactNode; | ||
} | ||
|
||
export function OpplysningListItem( | ||
opplysningListItemProps: OpplysningListItemProps | ||
) { | ||
const { children } = opplysningListItemProps; | ||
|
||
return ( | ||
<p className={`before:content-['–'] before:mr-1 before:inline-block`}> | ||
{children} | ||
</p> | ||
); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/sider/sykmeldinger/sykmelding/sykmeldingOpplysninger/RadContainer.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,18 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
interface RadContainerProps { | ||
children?: ReactNode; | ||
} | ||
|
||
export function RadContainer(radContainerProps: RadContainerProps) { | ||
const { children } = radContainerProps; | ||
return ( | ||
<div | ||
className={ | ||
"md:flex md:mr-8 md:flex-1 md:w-[calc(50% - 2rem)] md:last:*:w-1/2 md:last:*:mr-0" | ||
} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.