diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-10-25 11:51:37 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-10-25 11:51:37 +0200 |
| commit | 0005595703b2f3f7083ce4ba19bf5770057c75bd (patch) | |
| tree | 193a897f61a9a5e566961601de4cf42ae85984a0 /code/app/src/lib/components/input.svelte | |
| parent | 585c5c8537eb21dfc9f16108548e63d9ced3d971 (diff) | |
| download | greatoffice-0005595703b2f3f7083ce4ba19bf5770057c75bd.tar.xz greatoffice-0005595703b2f3f7083ce4ba19bf5770057c75bd.zip | |
.
Diffstat (limited to 'code/app/src/lib/components/input.svelte')
| -rw-r--r-- | code/app/src/lib/components/input.svelte | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/code/app/src/lib/components/input.svelte b/code/app/src/lib/components/input.svelte index efd8946..5d38597 100644 --- a/code/app/src/lib/components/input.svelte +++ b/code/app/src/lib/components/input.svelte @@ -1,6 +1,7 @@ <script lang="ts"> import pwKey from "$actions/pwKey"; import { random_string } from "$lib/helpers"; + import { htmlLangAttributeDetector } from "typesafe-i18n/detectors"; import { ExclamationCircleIcon } from "./icons"; export let label: string | undefined = undefined; @@ -47,12 +48,14 @@ {#if label && !cornerHint && !hideLabel} <label for={id} class={hideLabel ? "sr-only" : "block text-sm font-medium text-gray-700"}> {label} + {@html required ? "<span class='text-red-500'>*</span>" : ""} </label> {:else if cornerHint && !hideLabel} <div class="flex justify-between"> {#if label} <label for={id} class={hideLabel ? "sr-only" : "block text-sm font-medium text-gray-700"}> {label} + {@html required ? "<span class='text-red-500'>*</span>" : ""} </label> {/if} <span class="text-sm text-gray-500"> |
