29 lines
845 B
TypeScript
29 lines
845 B
TypeScript
import React from "react";
|
|
|
|
export default function OutputModal({ isOpen, output, closeModal }) {
|
|
if (!isOpen || !output) 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 Ausgang {output.id}
|
|
</h2>
|
|
<p>
|
|
<strong>Bezeichnung:</strong> {output.description}
|
|
</p>
|
|
<p>
|
|
<strong>Status:</strong>{" "}
|
|
{output.toggle ? "Eingeschaltet" : "Ausgeschaltet"}
|
|
</p>
|
|
<button
|
|
onClick={closeModal}
|
|
className="mt-4 px-4 py-2 bg-blue-500 text-white rounded-lg"
|
|
>
|
|
Schließen
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|