Skip to content

Commit

Permalink
Svart tekst under hva/hvorfor søke
Browse files Browse the repository at this point in the history
Co-authored-by: joeldlin <jorgen.elden.lindgren@nav.no>
  • Loading branch information
toresbe and joeldlin committed May 15, 2024
1 parent e5005c9 commit 995ce10
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/pages/02-begrunnelse/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as z from "zod";
import {BegrunnelseFrontend} from "../../generated/model";
import {Alert, Textarea} from "@navikt/ds-react";
import {Alert, BodyShort, Textarea} from "@navikt/ds-react";
import {FieldError, useForm} from "react-hook-form";
import {useTranslation} from "react-i18next";
import {zodResolver} from "@hookform/resolvers/zod";
Expand Down Expand Up @@ -62,14 +62,22 @@ export const Begrunnelse = () => {
id={"hvaSokesOm"}
error={errors.hvaSokesOm && <TranslatedError error={errors.hvaSokesOm} />}
label={begrunnelseNyTekst ? t("hva.label") : t("hva.label.old")}
description={begrunnelseNyTekst ? t("hva.description") : t("hva.description.old")}
description={
begrunnelseNyTekst ? (
<BodyShort>{t("hva.description")}</BodyShort>
) : (
<BodyShort>{t("hva.description.old")}</BodyShort>
)
}
/>
<Textarea
{...register("hvorforSoke")}
id={"hvorforSoke"}
label={begrunnelseNyTekst ? t("hvorfor.label") : t("hvorfor.label.old")}
description={begrunnelseNyTekst ? t("hvorfor.description") : undefined}
error={errors.hvorforSoke && <TranslatedError error={errors.hvorforSoke} />}
label={begrunnelseNyTekst ? t("hvorfor.label") : t("hvorfor.label.old")}
description={
begrunnelseNyTekst ? <BodyShort>{t("hvorfor.description")}</BodyShort> : undefined
}
/>
</form>
)}
Expand Down

0 comments on commit 995ce10

Please sign in to comment.