Files
CPLv4.0/components/main/einausgaenge/modals/OutputModal.tsx
2025-02-19 13:38:50 +01:00

34 lines
918 B
TypeScript

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