Skip to content

Commit

Permalink
legg til helptext for postnummer & poststed for distribuering av doku…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
RamziAbuQassim committed Jun 7, 2024
1 parent 29014bc commit 37fbc22
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
display: flex;
align-items: flex-start;
gap: @spacing-s;

.label {
display: flex;
gap: @spacing-xs;
}
}

.formButtonsContainer {
Expand Down
16 changes: 13 additions & 3 deletions src/pages/drift/components/dokument/DokumentDistribusjon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as RemoteData from '@devexperts/remote-data-ts';
import { yupResolver } from '@hookform/resolvers/yup';
import { Alert, Button, Modal, TextField } from '@navikt/ds-react';
import { Alert, BodyShort, Button, HelpText, Modal, TextField } from '@navikt/ds-react';
import { useState } from 'react';
import { Control, Controller, useFieldArray, useForm } from 'react-hook-form';

Expand Down Expand Up @@ -98,7 +98,12 @@ const DokumentDistribusjonsModal = (props: { visModal: boolean; onClose: () => v
name={'postnummer'}
render={({ field, fieldState }) => (
<TextField
label={'Postnummer'}
label={
<div className={styles.label}>
<BodyShort>Postnummer</BodyShort>
<HelpText>Postnummer blir ikke validert</HelpText>
</div>
}
onChange={field.onChange}
error={fieldState.error?.message}
/>
Expand All @@ -109,7 +114,12 @@ const DokumentDistribusjonsModal = (props: { visModal: boolean; onClose: () => v
name={'poststed'}
render={({ field, fieldState }) => (
<TextField
label={'Poststed'}
label={
<div className={styles.label}>
<BodyShort>Poststed</BodyShort>
<HelpText>Poststed blir ikke validert</HelpText>
</div>
}
onChange={field.onChange}
error={fieldState.error?.message}
/>
Expand Down

0 comments on commit 37fbc22

Please sign in to comment.