🎨 Komponentisering og formatering av FeilKort og FeilkortKonteiner
This commit is contained in:
parent
23233121d0
commit
d9e984c292
3 changed files with 30 additions and 13 deletions
27
frontend/components/CardsContainer.tsx
Normal file
27
frontend/components/CardsContainer.tsx
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import FeilCard from "./FeilCard";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns Komponent for returnering av konteiner med alle feilinnmeldingene.
|
||||||
|
*/
|
||||||
|
const CardsContainer = () => {
|
||||||
|
return(
|
||||||
|
<div>
|
||||||
|
<div className="bg-red-500 grid grid-cols-2 gap-4">
|
||||||
|
<FeilCard />
|
||||||
|
<FeilCard />
|
||||||
|
<FeilCard />
|
||||||
|
<FeilCard />
|
||||||
|
</div>
|
||||||
|
<div className="bg-blue-500 flex flex-row flex-wrap gap-4">
|
||||||
|
<FeilCard />
|
||||||
|
<FeilCard />
|
||||||
|
<FeilCard />
|
||||||
|
<FeilCard />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default CardsContainer
|
|
@ -21,12 +21,11 @@ const FeilCard = () => {
|
||||||
<ExpansionCard.Description>
|
<ExpansionCard.Description>
|
||||||
Dummy Dummy Java
|
Dummy Dummy Java
|
||||||
</ExpansionCard.Description>
|
</ExpansionCard.Description>
|
||||||
<TagBar />
|
<TagBar />
|
||||||
</ExpansionCard.Header>
|
</ExpansionCard.Header>
|
||||||
<ExpansionCard.Content>
|
<ExpansionCard.Content>
|
||||||
Hællæ
|
Hællæ
|
||||||
</ExpansionCard.Content>
|
</ExpansionCard.Content>
|
||||||
|
|
||||||
</ExpansionCard>
|
</ExpansionCard>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import FeilCard from "../components/FeilCard";
|
import CardsContainer from "@/components/CardsContainer";
|
||||||
import "@navikt/ds-css";
|
import "@navikt/ds-css";
|
||||||
import { Button, Heading, Search } from "@navikt/ds-react";
|
import { Button, Heading, Search } from "@navikt/ds-react";
|
||||||
import router from "next/router";
|
import router from "next/router";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
|
||||||
const handleFeil = () => {
|
const handleFeil = () => {
|
||||||
router.push('/feil')
|
router.push('/feil')
|
||||||
}
|
}
|
||||||
|
@ -12,7 +11,6 @@ export default function Home() {
|
||||||
return (
|
return (
|
||||||
<main className="flex flex-col h-screen">
|
<main className="flex flex-col h-screen">
|
||||||
<div className="h-12 bg-gray-900"></div>
|
<div className="h-12 bg-gray-900"></div>
|
||||||
|
|
||||||
<div className="flex justify-center grow">
|
<div className="flex justify-center grow">
|
||||||
<div className="bg-bg-subtle w-1/6 p-8 flex flex-col justify-end">
|
<div className="bg-bg-subtle w-1/6 p-8 flex flex-col justify-end">
|
||||||
<div className="flex flex-col gap-4 text-center bottom-0">
|
<div className="flex flex-col gap-4 text-center bottom-0">
|
||||||
|
@ -42,14 +40,7 @@ export default function Home() {
|
||||||
>
|
>
|
||||||
Innmeldte feil (saker, feilmeldinger poster, feil)
|
Innmeldte feil (saker, feilmeldinger poster, feil)
|
||||||
</Heading>
|
</Heading>
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<CardsContainer/>
|
||||||
<FeilCard />
|
|
||||||
<FeilCard />
|
|
||||||
<FeilCard />
|
|
||||||
<FeilCard />
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="bg-bg-subtle w-1/6 p-8">
|
<div className="bg-bg-subtle w-1/6 p-8">
|
||||||
|
|
Reference in a new issue