feat: Tooltip für Eingangszustände eingebaut und versetzt positioniert
- Tooltip-Text erscheint bei Mouseover über Symbol - Unterscheidung: Eingang inaktiv (✖), Eingang Aus (● rot), Eingang Ein (● grün) - Position des Tooltips mit translate-x-4 und translate-y-4 optimiert
This commit is contained in:
@@ -44,10 +44,27 @@ export default function DigitalInputs({ openInputModal, inputRange }: Props) {
|
||||
{input.id}
|
||||
</td>
|
||||
<td className="px-1 py-1">
|
||||
{input.status ? (
|
||||
<span className="text-red-500 text-xs">✕</span>
|
||||
{input.eingangOffline ? (
|
||||
<div className="relative group inline-block">
|
||||
<span className="text-red-500 text-2xl font-bold">✖</span>
|
||||
<div className="absolute bottom-full translate-x-4 translate-y-4 w-max bg-gray-400 text-xs text-white rounded opacity-0 group-hover:opacity-100 transition p-1 z-10">
|
||||
Eingang inaktiv
|
||||
</div>
|
||||
</div>
|
||||
) : input.status ? (
|
||||
<div className="relative group inline-block">
|
||||
<span className="text-red-500 text-2xl">●</span>
|
||||
<div className="absolute bottom-full translate-x-4 translate-y-4 w-max bg-gray-400 text-xs text-white rounded opacity-0 group-hover:opacity-100 transition p-1 z-10">
|
||||
Eingang Aus
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-green-500 text-xs">●</span>
|
||||
<div className="relative group inline-block">
|
||||
<span className="text-green-500 text-2xl">●</span>
|
||||
<div className="absolute bottom-full translate-x-4 translate-y-4 w-max bg-gray-400 text-xs text-white rounded opacity-0 group-hover:opacity-100 transition p-1 z-10">
|
||||
Eingang Ein
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user