mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
refactor: modularize text counter
This commit is contained in:
1 parent
a160506a74
commit
505cfe2cb4
1 file changed
+2
-5
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { FormItem } from '.';
|
||||
import TextCounter from './textCounter.svelte';
|
||||
|
||||
export let value = '';
|
||||
|
||||
@@ -42,11 +43,7 @@
|
||||
bind:value
|
||||
bind:this={element}
|
||||
on:invalid={handleInvalid} />
|
||||
<span class="text-counter">
|
||||
<span class="text-counter-count">{value?.length ?? 0}</span>
|
||||
<span class="text-counter-separator" />
|
||||
<span class="text-counter-max">36</span>
|
||||
</span>
|
||||
<TextCounter count={value?.length ?? 0} max={36} />
|
||||
</div>
|
||||
</FormItem>
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user