-
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.
- Loading branch information
1 parent
cdc4373
commit 29cbb25
Showing
10 changed files
with
145 additions
and
77 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 |
---|---|---|
@@ -1,60 +1,80 @@ | ||
import React from "react" | ||
import { BodyLong, Heading } from "@navikt/ds-react" | ||
import { Chat2Icon, DocPencilIcon, PersonIcon } from "@navikt/aksel-icons" | ||
import React from "react"; | ||
import { BodyLong, Heading } from "@navikt/ds-react"; | ||
import { Chat2Icon, DocPencilIcon, PersonIcon } from "@navikt/aksel-icons"; | ||
import { | ||
hvaBetyrDetText, | ||
hvaMaDuGjoreText, | ||
hvordanVurdererText, | ||
} from "./InfoTexts" | ||
hvaBetyrDetText, | ||
hvaMaDuGjoreText, | ||
hvordanVurdererText, | ||
} from "./InfoTexts"; | ||
import { IconRow } from "@/components/icons/IconRow"; | ||
import { Skeletor } from "@/components/skeleton/Skeletor"; | ||
|
||
interface Props { | ||
harArbeidsgiver: boolean | ||
harArbeidsgiver: boolean; | ||
displaySkeleton?: boolean; | ||
} | ||
|
||
export const AktivitetskravInfo = ({ harArbeidsgiver }: Props) => { | ||
return ( | ||
<div className="flex flex-col gap-8"> | ||
<div className="mb-4"> | ||
<BodyLong spacing>Hei!</BodyLong> | ||
|
||
<BodyLong> | ||
Det er på tide å informere deg om aktivitetsplikten. Alle | ||
sykmeldte skal i utgangspunktet jobbe litt hvis de kan, også | ||
hvis de er 100 % sykmeldt. Dette kalles aktivitetsplikt i | ||
folketrygdloven. | ||
</BodyLong> | ||
</div> | ||
|
||
<IconRow icon={<DocPencilIcon />}> | ||
<div> | ||
<Heading size="medium" level="3" spacing> | ||
Hvordan vurderer NAV aktivitetsplikten? | ||
</Heading> | ||
|
||
<BodyLong>{hvordanVurdererText(harArbeidsgiver)}</BodyLong> | ||
</div> | ||
</IconRow> | ||
|
||
<IconRow icon={<PersonIcon />}> | ||
<div> | ||
<Heading size="medium" level="3" spacing> | ||
Hva betyr det for deg? | ||
</Heading> | ||
|
||
<BodyLong>{hvaBetyrDetText(harArbeidsgiver)}</BodyLong> | ||
</div> | ||
</IconRow> | ||
|
||
<IconRow icon={<Chat2Icon />}> | ||
<div> | ||
<Heading size="medium" level="3" spacing> | ||
Hva må du gjøre? | ||
</Heading> | ||
|
||
<BodyLong>{hvaMaDuGjoreText(harArbeidsgiver)}</BodyLong> | ||
</div> | ||
</IconRow> | ||
export const AktivitetskravInfo = ({ | ||
harArbeidsgiver, | ||
displaySkeleton = false, | ||
}: Props) => { | ||
return ( | ||
<div className="flex flex-col gap-8"> | ||
<div className="mb-4"> | ||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<BodyLong spacing>Hei!</BodyLong> | ||
</Skeletor> | ||
|
||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<BodyLong> | ||
Det er på tide å informere deg om aktivitetsplikten. Alle sykmeldte | ||
skal i utgangspunktet jobbe litt hvis de kan, også hvis de er 100 % | ||
sykmeldt. Dette kalles aktivitetsplikt i folketrygdloven. | ||
</BodyLong> | ||
</Skeletor> | ||
</div> | ||
|
||
<IconRow icon={<DocPencilIcon />} displaySkeleton={displaySkeleton}> | ||
<div> | ||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<Heading size="medium" level="3" spacing> | ||
Hvordan vurderer NAV aktivitetsplikten? | ||
</Heading> | ||
</Skeletor> | ||
|
||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<BodyLong>{hvordanVurdererText(harArbeidsgiver)}</BodyLong> | ||
</Skeletor> | ||
</div> | ||
) | ||
} | ||
</IconRow> | ||
|
||
<IconRow icon={<PersonIcon />} displaySkeleton={displaySkeleton}> | ||
<div> | ||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<Heading size="medium" level="3" spacing> | ||
Hva betyr det for deg? | ||
</Heading> | ||
</Skeletor> | ||
|
||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<BodyLong>{hvaBetyrDetText(harArbeidsgiver)}</BodyLong> | ||
</Skeletor> | ||
</div> | ||
</IconRow> | ||
|
||
<IconRow icon={<Chat2Icon />} displaySkeleton={displaySkeleton}> | ||
<div> | ||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<Heading size="medium" level="3" spacing> | ||
Hva må du gjøre? | ||
</Heading> | ||
</Skeletor> | ||
|
||
<Skeletor displaySkeleton={displaySkeleton}> | ||
<BodyLong>{hvaMaDuGjoreText(harArbeidsgiver)}</BodyLong> | ||
</Skeletor> | ||
</div> | ||
</IconRow> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import CircledIcon from "./CircledIcon" | ||
import React, { ReactElement } from "react" | ||
import CircledIcon from "./CircledIcon"; | ||
import React, { ReactElement } from "react"; | ||
import { Skeleton } from "@navikt/ds-react"; | ||
|
||
interface Props { | ||
icon: ReactElement | ||
children: ReactElement | ||
icon: ReactElement; | ||
children: ReactElement; | ||
displaySkeleton?: boolean; | ||
} | ||
export const IconRow = ({ icon, children }: Props) => { | ||
return ( | ||
<div className="flex flex-row gap-4"> | ||
<CircledIcon className="hidden sm:flex" icon={icon} /> | ||
{children} | ||
export const IconRow = ({ icon, displaySkeleton = false, children }: Props) => { | ||
return ( | ||
<div className="flex flex-row gap-4"> | ||
{displaySkeleton ? ( | ||
<div> | ||
<Skeleton variant="circle" width={60} height={60} /> | ||
</div> | ||
) | ||
} | ||
) : ( | ||
<CircledIcon className="hidden sm:flex" icon={icon} /> | ||
)} | ||
{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
19 changes: 19 additions & 0 deletions
19
src/components/skeleton/AktivitetskravSkeletonComponent.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,19 @@ | ||
"use client"; | ||
import { Page } from "@/components/page/Page"; | ||
import { AktivitetskravInfo } from "@/components/aktivitetskrav/AktivitetskravInfo"; | ||
import { Link, Skeleton } from "@navikt/ds-react"; | ||
|
||
export const AktivitetskravSkeletonComponent = () => { | ||
return ( | ||
<Page headerText={<Skeleton>Informasjon om aktivitetsplikt</Skeleton>}> | ||
<AktivitetskravInfo harArbeidsgiver={true} displaySkeleton={true} /> | ||
|
||
<Link | ||
className="flex self-center" | ||
href={process.env.NEXT_PUBLIC_MIN_SIDE_URL} | ||
> | ||
Naviger til Min side | ||
</Link> | ||
</Page> | ||
); | ||
}; |
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,13 @@ | ||
import { Skeleton } from "@navikt/ds-react"; | ||
import { SkeletonProps } from "@navikt/ds-react/src/skeleton/Skeleton"; | ||
|
||
interface Props extends SkeletonProps { | ||
displaySkeleton: boolean; | ||
} | ||
|
||
export const Skeletor = ({ displaySkeleton, children }: Props) => { | ||
if (displaySkeleton) { | ||
return <Skeleton>{children}</Skeleton>; | ||
} | ||
return children; | ||
}; |
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