From a8e991420efe13101c45d35ec97a47757bee0193 Mon Sep 17 00:00:00 2001 From: Markus Johansen Date: Thu, 3 Aug 2023 08:12:04 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Gjorde=20kommentar=20til=20en=20?= =?UTF-8?q?"notat-klistrelapp"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/FeilmeldingsInnhold.tsx | 88 +++++++++++++------ frontend/src/components/Skillelinje.tsx | 8 ++ 2 files changed, 68 insertions(+), 28 deletions(-) create mode 100644 frontend/src/components/Skillelinje.tsx diff --git a/frontend/src/components/FeilmeldingsInnhold.tsx b/frontend/src/components/FeilmeldingsInnhold.tsx index 3f4c555..e19a662 100644 --- a/frontend/src/components/FeilmeldingsInnhold.tsx +++ b/frontend/src/components/FeilmeldingsInnhold.tsx @@ -1,8 +1,9 @@ import { ChatElipsisIcon, PencilIcon, XMarkIcon } from "@navikt/aksel-icons" -import { Button, Chat, TextField, Textarea } from "@navikt/ds-react" +import { Button, Heading, TextField } from "@navikt/ds-react" import { FeilmeldingsInnholdInterface } from "../interface" import FeilkortHeader from "./FeilkortHeader" import { useState } from "react" +import Skillelinje from "./Skillelinje" const FeilmeldingsInnhold = (props: FeilmeldingsInnholdInterface) => { @@ -38,40 +39,71 @@ const FeilmeldingsInnhold = (props: FeilmeldingsInnholdInterface) => { -
+ {props.children} - {kommentar.length === 0 ? <> : ()} -
- setKommentarfelt(e.target.value)} - > - - - -
+ {kommentar.length === 0 ? + + : + + } ) } export default FeilmeldingsInnhold; -const Kommentar = ({tekst} : {tekst: string}) => { +interface Ikommentar { + setKommentarfelt: (val: string) => void + setKommentar: (val: string) => void +} + +interface kommentarTekstfeltInterface extends Ikommentar{ + kommentarfelt: string, +} +interface kommentarInterface extends Ikommentar { + tekst: string +} + + +const KommentarTekstfelt = (props: kommentarTekstfeltInterface) => { return( - - -

{tekst}

-
-
+
+ props.setKommentarfelt(e.target.value)} + > + + +
+ ) +} + +const Kommentar = (props: kommentarInterface) => { + return( + <> + +
+ Notat +

{props.tekst}

+
+ ) } \ No newline at end of file diff --git a/frontend/src/components/Skillelinje.tsx b/frontend/src/components/Skillelinje.tsx new file mode 100644 index 0000000..1df1ccd --- /dev/null +++ b/frontend/src/components/Skillelinje.tsx @@ -0,0 +1,8 @@ + + +const Skillelinje = () => { + return ( +
+ ) +} +export default Skillelinje \ No newline at end of file