import { Dialog as Kobalte } from "@kobalte/core/dialog" import { JSX, Show } from "solid-js" import "./modal.css" interface ModalProps { open: boolean onClose: () => void title?: string variant?: "black" children: JSX.Element } export function Modal(props: ModalProps) { return ( { if (!open) props.onClose() }} > e.stopPropagation()} onOpenAutoFocus={(e) => { e.preventDefault() const target = e.currentTarget as HTMLElement | null target?.focus({ preventScroll: true }) }} > {props.title} {props.children} ) }