Merge pull request #393 from appwrite/fix-attributes-correct-inputs

fix: attributes user correct inputs
This commit is contained in:
Torsten Dittmann authored and GitHub committed 2023-04-12 11:26:32 +02:00
commit fb76694f3e
3 files changed
+23 -3

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@
import NullCheckbox from './nullCheckbox.svelte';
export let label: string;
export let optionalText: string | undefined = undefined;
export let showLabel = true;
export let id: string;
export let value = '';
@@ -54,7 +55,7 @@
</script>
<FormItem>
<Label {required} hide={!showLabel} for={id}>
<Label {required} {optionalText} hide={!showLabel} for={id}>
{label}
</Label>
@@ -34,7 +34,7 @@
</script>
<script lang="ts">
import { InputText, InputChoice } from '$lib/elements/forms';
import { InputChoice, InputURL } from '$lib/elements/forms';
export let data: Partial<Models.AttributeUrl>;
export let editing = false;
@@ -44,7 +44,7 @@
}
</script>
<InputText
<InputURL
id="default"
label="Default value"
placeholder="Enter value"
@@ -0,0 +1,19 @@
<script lang="ts">
import InputEmail from '$lib/elements/forms/inputEmail.svelte';
import type { Models } from '@appwrite.io/console';
export let id: string;
export let label: string;
export let value: string | null;
export let optionalText: string | undefined = undefined;
export let attribute: Models.AttributeUrl;
</script>
<InputEmail
{id}
{label}
{optionalText}
placeholder="Enter URL"
showLabel={!!label?.length}
required={attribute.required}
bind:value />