fixed problem with color

This commit is contained in:
Dmitry Borisenko
2021-10-18 03:31:36 +08:00
parent 64cee1cedf
commit 93b887e897
3 changed files with 97 additions and 27 deletions

View File

@@ -10,20 +10,58 @@
<div class="card-items">
<div class="md:w-2/3 lg:w-2/3 2xl:w-2/3">
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-descr-gray-left">{!widget.descr ? "" : widget.descr}</label>
<label class="widget-descr-gray-left"
>{!widget.descr ? "" : widget.descr}</label>
</div>
<div class="md:w-1/3 lg:w-1/3 2xl:w-1/3">
{#if widget.type == "number"}
<input on:change={WSpush(widget.ws, widget.topic, widget.status)} bind:value class="widget-input-indigo text-right" step="0.1" type="number" />
<input
class={widget["send"] == true
? "widget-input border-red-500"
: "widget-input focus:border-indigo-500"}
on:change={() => (
(widget["send"] = true),
WSpush(widget.ws, widget.topic, widget.status)
)}
bind:value
step="0.1"
type="number" />
{/if}
{#if widget.type == "text"}
<input on:change={WSpush(widget.ws, widget.topic, widget.status)} bind:value class="widget-input-indigo text-right" type="text" />
<input
class={widget["send"] == true
? "widget-input border-red-500"
: "widget-input focus:border-indigo-500"}
on:change={() => (
(widget["send"] = true),
WSpush(widget.ws, widget.topic, widget.status)
)}
bind:value
type="text" />
{/if}
{#if widget.type == "date"}
<input on:change={WSpush(widget.ws, widget.topic, widget.status)} bind:value class="widget-input-indigo text-right" type="date" />
<input
class={widget["send"] == true
? "widget-input border-red-500"
: "widget-input focus:border-indigo-500"}
on:change={() => (
(widget["send"] = true),
WSpush(widget.ws, widget.topic, widget.status)
)}
bind:value
type="date" />
{/if}
{#if widget.type == "time"}
<input on:change={WSpush(widget.ws, widget.topic, widget.status)} bind:value class="widget-input-indigo text-right" type="time" />
<input
class={widget["send"] == true
? "widget-input border-red-500"
: "widget-input focus:border-indigo-500"}
on:change={() => (
(widget["send"] = true),
WSpush(widget.ws, widget.topic, widget.status)
)}
bind:value
type="time" />
{/if}
</div>
</div>