modals ausgelagern von pages/einausgaenge.tsx

This commit is contained in:
Ismail Ali
2025-02-19 13:38:50 +01:00
parent 3b482935d5
commit 6eecd8c96d
3 changed files with 83 additions and 52 deletions

View File

@@ -0,0 +1,29 @@
"use client";
import React from "react";
export default function InputModal({ selectedInput, closeInputModal, isOpen }) {
if (!isOpen || !selectedInput) return null;
return (
<div className="fixed top-0 left-0 w-full h-full bg-black bg-opacity-50 flex justify-center items-center z-50">
<div className="bg-white rounded-lg shadow-lg p-6 w-1/3">
<h2 className="text-lg font-bold mb-4">
Details für Eingang {selectedInput.id}
</h2>
<p>
<strong>Status:</strong>{" "}
{selectedInput.status === "active" ? "Aktiv" : "Inaktiv"}
</p>
<p>
<strong>Beschreibung:</strong> {selectedInput.description}
</p>
<button
onClick={closeInputModal}
className="mt-4 px-4 py-2 bg-blue-500 text-white rounded-lg"
>
Schließen
</button>
</div>
</div>
);
}