diff --git a/frontend/src/components/FeilCard.tsx b/frontend/src/components/FeilCard.tsx index 7c4d68b..16923ca 100644 --- a/frontend/src/components/FeilCard.tsx +++ b/frontend/src/components/FeilCard.tsx @@ -3,7 +3,7 @@ import { Button, Heading, Modal, Tag } from "@navikt/ds-react"; import { IFeilmelding } from "../interface"; import FeilModal from "./FeilModal"; import { useEffect, useState } from "react"; -import { PencilIcon, XMarkIcon } from "@navikt/aksel-icons"; +import { FloppydiskIcon, PencilIcon, XMarkIcon } from "@navikt/aksel-icons"; /** * En konteiner som inneholder all informasjon og funksjonalitet for å vise og interagere med en feilmelding. @@ -15,12 +15,20 @@ import { PencilIcon, XMarkIcon } from "@navikt/aksel-icons"; interface IFeilKort extends IFeilmelding { key: number } + + export const FeilKort = (props: IFeilKort) => { const [visModal, setVisModal] = useState(false) + const [redigeringsmodus, setRedigeringsmodus] = useState(false) useEffect(() => { Modal.setAppElement(document.getElementById('root')); }, []); + + const lagreEndringer = () => { + setRedigeringsmodus(false) + + } return( <> @@ -35,23 +43,53 @@ export const FeilKort = (props: IFeilKort) => { -
- -
- - + {redigeringsmodus ? + +
+ +
+ + +
-
+ + : +
+ +
+ + +
+
+ }