diff --git a/apps/frontend/src/components/krav/Edit/KravSuksesskriterieEdit.tsx b/apps/frontend/src/components/krav/Edit/KravSuksesskriterieEdit.tsx index 9b205fa30..deaec4742 100644 --- a/apps/frontend/src/components/krav/Edit/KravSuksesskriterieEdit.tsx +++ b/apps/frontend/src/components/krav/Edit/KravSuksesskriterieEdit.tsx @@ -1,5 +1,5 @@ import { PlusIcon, TrashIcon } from '@navikt/aksel-icons' -import { Box, Button, Radio, RadioGroup, TextField, Tooltip } from '@navikt/ds-react' +import { Box, Button, Radio, RadioGroup, TextField, ToggleGroup, Tooltip } from '@navikt/ds-react' import { FieldArray, FieldArrayRenderProps } from 'formik' import * as _ from 'lodash' import { useEffect, useState } from 'react' @@ -7,6 +7,7 @@ import { EKravStatus, ISuksesskriterie } from '../../../constants' import { useDebouncedState } from '../../../util/hooks/customHooks' import { FieldWrapper } from '../../common/Inputs' import LabelWithTooltip from '../../common/LabelWithTooltip' +import { Markdown } from '../../common/Markdown' import { FormError } from '../../common/ModalSchema' import { RearrangeButtons } from '../../common/RearrangeButtons' import TextEditor from '../../common/TextEditor/TextEditor' @@ -138,6 +139,8 @@ const Kriterie = ({ : suksesskriterium.behovForBegrunnelse.toString() ) + const [mode, setMode] = useState('edit') + const nummer = index + 1 const updateIndex = (newIndex: number) => { @@ -171,7 +174,6 @@ const Kriterie = ({ /> )} - -
+
+
- - +
+
+ +
+
+ + Redigering + Forhåndsvisning + +
+
+ + {mode === 'edit' && ( + + )} + + {mode === 'view' && ( +
+ +
+ )}