[O] Disable on tested

This commit is contained in:
Azalea
2025-03-20 06:05:46 -04:00
parent 182c3ba393
commit c6af5b7d87
2 changed files with 8 additions and 6 deletions

View File

@@ -4,13 +4,15 @@
export let placeholder: string
export let flex: number = 60
export let disabled: boolean = false
export let validate: (value: string) => boolean = () => true
</script>
<div class="field" style="flex: {flex}">
<label for={desc}>{desc}</label>
<input type="text" placeholder={placeholder} bind:value={value} id="{desc}" on:change
class:error={value && !validate(value)}/>
class:error={value && !validate(value)} {disabled}/>
</div>
<style lang="sass">