File tree 4 files changed +55
-39
lines changed
4 files changed +55
-39
lines changed Original file line number Diff line number Diff line change 2
2
import feather from ' feather-icons' ;
3
3
import Button from ' ./reusable/Button.vue' ;
4
4
import FormInput from ' ./reusable/FormInput.vue' ;
5
+ import FormTextarea from ' ./reusable/FormTextarea.vue' ;
5
6
export default {
6
7
props: [' showModal' , ' modal' , ' categories' ],
7
- components: { Button, FormInput },
8
+ components: { Button, FormInput, FormTextarea },
8
9
data () {
9
10
return {};
10
11
},
@@ -67,7 +68,7 @@ export default {
67
68
inputType =" email"
68
69
/>
69
70
70
- <div class =" mt-6" >
71
+ <div class =" mt-6 mb-4 " >
71
72
<label
72
73
class =" block mb-2 text-lg text-primary-dark dark:text-primary-light"
73
74
for =" project"
@@ -91,24 +92,12 @@ export default {
91
92
</select >
92
93
</div >
93
94
94
- <div class =" mt-6" >
95
- <label
96
- class =" block mb-2 text-lg text-primary-dark dark:text-primary-light"
97
- for =" details"
98
- >Details</label
99
- >
100
- <textarea
101
- class =" w-full px-5 py-2 border-1 border-gray-200 dark:border-secondary-dark rounded-md text-md bg-secondary-light dark:bg-ternary-dark text-primary-dark dark:text-ternary-light"
102
- id =" details"
103
- name =" details"
104
- cols =" 14"
105
- rows =" 6"
106
- aria-label =" Details"
107
- placeholder =" Project description"
108
- ></textarea >
109
- </div >
95
+ <FormTextarea
96
+ label =" Details"
97
+ textareaIdentifier =" details"
98
+ />
110
99
111
- <div class =" mt-6 pb-4 sm:pb-1" >
100
+ <div class =" mt-7 pb-4 sm:pb-1" >
112
101
<Button
113
102
title =" Send Request"
114
103
class =" px-4 sm:px-6 py-2 sm:py-2.5 text-white bg-indigo-500 hover:bg-indigo-600 rounded-md focus:ring-1 focus:ring-indigo-900 duration-500"
Original file line number Diff line number Diff line change 1
1
<script >
2
2
import Button from ' ../reusable/Button.vue' ;
3
3
import FormInput from ' ../reusable/FormInput.vue' ;
4
- export default { components: { Button, FormInput } };
4
+ import FormTextarea from ' ../reusable/FormTextarea.vue' ;
5
+ export default { components: { Button, FormInput, FormTextarea } };
5
6
</script >
6
7
7
8
<template >
@@ -22,22 +23,7 @@ export default { components: { Button, FormInput } };
22
23
inputType =" email"
23
24
/>
24
25
<FormInput label =" Subject" inputIdentifier =" subject" />
25
-
26
- <div >
27
- <label
28
- class =" block text-lg text-primary-dark dark:text-primary-light mb-2"
29
- for =" message"
30
- >Message</label
31
- >
32
- <textarea
33
- class =" w-full px-5 py-2 border border-gray-300 dark:border-primary-dark border-opacity-50 text-primary-dark dark:text-secondary-light bg-ternary-light dark:bg-ternary-dark rounded-md shadow-sm text-md"
34
- id =" message"
35
- name =" message"
36
- cols =" 14"
37
- rows =" 6"
38
- aria-label =" Message"
39
- ></textarea >
40
- </div >
26
+ <FormTextarea label =" Message" textareaIdentifier =" message" />
41
27
42
28
<div >
43
29
<Button
Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ export default {
34
34
:name =" inputIdentifier"
35
35
:placeholder =" label"
36
36
:aria-label =" inputIdentifier"
37
- required
38
- v-bind =" $attrs"
39
37
:value =" val"
40
- @input =" $emit('update:val', $event.target.value)"
41
38
:type =" inputType"
39
+ v-bind =" $attrs"
40
+ @input =" $emit('update:val', $event.target.value)"
41
+ required
42
42
/>
43
43
</div >
44
44
</template >
Original file line number Diff line number Diff line change
1
+ <script >
2
+ export default {
3
+ props: {
4
+ label: {
5
+ type: String ,
6
+ default: ' ' ,
7
+ },
8
+ textareaIdentifier: {
9
+ type: String ,
10
+ default: ' ' ,
11
+ },
12
+ val: {
13
+ type: [String , Number ],
14
+ default: ' ' ,
15
+ },
16
+ },
17
+ };
18
+ </script >
19
+
20
+ <template >
21
+ <div >
22
+ <label
23
+ class =" block text-lg text-primary-dark dark:text-primary-light mb-2"
24
+ :for =" textareaIdentifier"
25
+ >{{ label }}</label
26
+ >
27
+ <textarea
28
+ class =" w-full px-5 py-2 border border-gray-300 dark:border-primary-dark border-opacity-50 text-primary-dark dark:text-secondary-light bg-ternary-light dark:bg-ternary-dark rounded-md shadow-sm text-md"
29
+ :id =" textareaIdentifier"
30
+ :name =" textareaIdentifier"
31
+ :aria-label =" textareaIdentifier"
32
+ :placeholder =" label"
33
+ v-bind =" $attrs"
34
+ @input =" $emit('update:val', $event.target.value)"
35
+ cols =" 14"
36
+ rows =" 6"
37
+ ></textarea >
38
+ </div >
39
+ </template >
40
+
41
+ <style lang="scss" scoped></style >
You can’t perform that action at this time.
0 commit comments