ÜbergabeParameter für KÜ705-FO

This commit is contained in:
ISA
2024-10-15 21:20:52 +02:00
parent 5d6e945e56
commit 0fb0e67df4

View File

@@ -2,10 +2,10 @@ import React from "react";
import { Icon } from "@iconify/react"; // Für Iconify Icons import { Icon } from "@iconify/react"; // Für Iconify Icons
function Kue705FO({ function Kue705FO({
isolationswert, isolationswert, // Übergabeparameter für den Isolationswert
schleifenwiderstand, schleifenwiderstand, // Übergabeparameter für den Schleifenwiderstand
modulName, modulName, // Übergabeparameter für den Modulnamen
kueVersion, kueVersion = "V4.19", // Optionaler Parameter für die Version (Standardwert)
}) { }) {
return ( return (
<div className="relative bg-gray-300 w-[116px] h-[390px] border border-gray-400 scale-110 top-3"> <div className="relative bg-gray-300 w-[116px] h-[390px] border border-gray-400 scale-110 top-3">
@@ -45,7 +45,8 @@ function Kue705FO({
{/* Isolationswert-Anzeige */} {/* Isolationswert-Anzeige */}
<div className="relative mt-[50px] mx-auto bg-black text-white w-[80px] h-[40px] flex items-center justify-center text-[18px] z-10"> <div className="relative mt-[50px] mx-auto bg-black text-white w-[80px] h-[40px] flex items-center justify-center text-[18px] z-10">
<div className="text-center"> <div className="text-center">
<span>{">200"}</span> <span>{isolationswert || ">200"}</span>{" "}
{/* Dynamischer Isolationswert */}
<div className="text-[8px]">ISO MOhm</div> <div className="text-[8px]">ISO MOhm</div>
</div> </div>
</div> </div>
@@ -56,12 +57,12 @@ function Kue705FO({
{/* Modulname-Anzeige */} {/* Modulname-Anzeige */}
<div className="absolute bottom-[20px] left-[10px] text-black text-[10px] bg-gray-300 p-1 w-[100px] text-center"> <div className="absolute bottom-[20px] left-[10px] text-black text-[10px] bg-gray-300 p-1 w-[100px] text-center">
Test1 {modulName || "Test1"} {/* Dynamischer Modulname */}
</div> </div>
{/* Version */} {/* Version */}
<div className="absolute bottom-1 right-1 text-black text-[8px]"> <div className="absolute bottom-1 right-1 text-black text-[8px]">
V4.19 {kueVersion} {/* Dynamische Version */}
</div> </div>
</div> </div>
@@ -82,15 +83,15 @@ function Kue705FO({
{/* Wertanzeige */} {/* Wertanzeige */}
<div className="absolute bottom-[5px] left-1/2 transform -translate-x-1/2"> <div className="absolute bottom-[5px] left-1/2 transform -translate-x-1/2">
{/* Schleifenwiderstand */} {/* Dynamischer Schleifenwiderstand */}
<div className=" top-[220px] left-[10px] text-black text-[10px]"> <div className="top-[220px] left-[10px] text-black text-[10px]">
<p>{schleifenwiderstand} kOhm</p> <p>{schleifenwiderstand || "0"} kOhm</p>
</div> </div>
</div> </div>
</div> </div>
{/* Schleife und TDR Buttons nebeneinander */} {/* Schleife und TDR Buttons nebeneinander */}
<div className="flex mt-2 space-x-1"> <div className="flex mt-2 space-x-1">
<button <button
onClick={() => console.log("Schleife clicked")} onClick={() => console.log("Schleife clicked")}
className="w-[50%] h-[25px] bg-littwin-blue text-white text-[10px] flex items-center justify-center" className="w-[50%] h-[25px] bg-littwin-blue text-white text-[10px] flex items-center justify-center"