File tree Expand file tree Collapse file tree 2 files changed +38
-19
lines changed
documentation/docs/tutorial/03-Customization Expand file tree Collapse file tree 2 files changed +38
-19
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,26 @@ import { IconSearchOutline } from '@iconify-prerendered/vue-flowbite'
333333 </div >
334334</div >
335335
336+ ## Textarea
337+ <div class =" split-screen " >
338+ <div >
339+ ``` ts
340+ import { Textarea } from ' @/afcl'
341+ ```
342+
343+ ``` ts
344+ < Textarea
345+ v - model = " textAreaInput"
346+ placeholder = " Enter some text..."
347+ class = " w-64"
348+ / >
349+ ```
350+ </div >
351+ <div >
352+ 
353+ </div >
354+ </div >
355+
336356## Tooltip
337357
338358Wrap an element on which you would like to show a tooltip with the ` Tooltip ` component and add a ` tooltip ` slot to it.
Original file line number Diff line number Diff line change 1- <template >
2-
3- <textarea
4- ref =" input"
5- class =" bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-lg block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
6- :placeholder =" placeholder"
7- :value =" modelValue"
8- @input =" $emit('update:modelValue', ($event.target as HTMLInputElement).value)"
9- :readonly =" readonly"
10- />
11-
1+ <template >
2+ <textarea
3+ ref =" input"
4+ class =" bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-lg block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
5+ :placeholder =" placeholder"
6+ :value =" modelValue"
7+ @input =" $emit('update:modelValue', ($event.target as HTMLTextAreaElement).value)"
8+ :readonly =" readonly"
9+ />
1210</template >
1311
1412<script setup lang="ts">
15-
1613import { ref } from ' vue' ;
1714
1815const props = defineProps <{
19- modelValue: string ,
20- readonly? : boolean ,
21- placeholder? : string ,
16+ modelValue: string
17+ readonly? : boolean
18+ placeholder? : string
2219}>()
2320
24- const input = ref <HTMLInputElement | null >(null )
21+ const emit = defineEmits <{
22+ (e : ' update:modelValue' , value : string ): void
23+ }>()
24+
25+ const input = ref <HTMLTextAreaElement | null >(null )
2526
2627defineExpose ({
2728 focus : () => input .value ?.focus (),
28- });
29-
29+ })
3030 </script >
31-
You can’t perform that action at this time.
0 commit comments