Klikkbare feil (#17)

*  Feilkort som ikke er expansioncards

* 🚧 laget overlay med stort hvitt panel ved klikk av panel

* 🐛 Kan avslutte popup-overlay-vinduet ved å hindre DOM bubbling

https://stackoverflow.com/questions/1369035/how-do-i-prevent-a-parents-onclick-event-from-firing-when-a-child-anchor-is-cli

* ♻️  Delt opp feilkort og fullvisningskort i to komponenter ved bruk av useContext()

* 📝 La til dokumentasjon for feilkortkomponentene

* ⚰️  Forenklet cardscontainer komponentet ved å fjerne interface

* 🐛 La tilbake interface, da fjerning av dette brekket applikasjon

*  Popup er byttet ut mot AkselModal

* 🐛 Fikset scrolling, ved å tillate Modal i å kjøre cleanup code
This commit is contained in:
Markus A. R. Johansen 2023-07-31 14:48:07 +02:00 committed by GitHub
parent dee55dbeff
commit 755effe4da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 108 additions and 31 deletions

View file

@ -0,0 +1,26 @@
import { Modal } from "@navikt/ds-react"
import { Dispatch, SetStateAction } from "react"
interface modalInterface {
open: boolean
setOpen: Dispatch<SetStateAction<boolean>>
children: React.ReactNode
}
const FeilModal = (props: modalInterface) => {
return(
<Modal
className="w-3/5"
open={props.open}
aria-label={" modal"}
onClose={() => props.setOpen(false)}
aria-labelledby="modal-heading"
>
<Modal.Content>
{props.children}
</Modal.Content>
</Modal>
)
}
export default FeilModal;