File tree 2 files changed +55
-49
lines changed
2 files changed +55
-49
lines changed Original file line number Diff line number Diff line change 1
1
<script >
2
2
import Button from ' ../reusable/Button.vue' ;
3
- export default { components: { Button } };
3
+ import FormInput from ' ../reusable/FormInput.vue' ;
4
+ export default { components: { Button, FormInput } };
4
5
</script >
5
6
6
7
<template >
@@ -14,54 +15,13 @@ export default { components: { Button } };
14
15
Contact Form
15
16
</p >
16
17
<form action =" #" class =" font-general-regular space-y-7" >
17
- <div >
18
- <label
19
- class =" block text-lg text-primary-dark dark:text-primary-light mb-2"
20
- for =" name"
21
- >Full Name</label
22
- >
23
- <input
24
- 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"
25
- id =" name"
26
- name =" name"
27
- type =" text"
28
- required =" "
29
- placeholder =" Your Name"
30
- aria-label =" Name"
31
- />
32
- </div >
33
- <div >
34
- <label
35
- class =" block text-lg text-primary-dark dark:text-primary-light mb-2"
36
- for =" email"
37
- >Email</label
38
- >
39
- <input
40
- 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"
41
- id =" email"
42
- name =" email"
43
- type =" text"
44
- required =" "
45
- placeholder =" Your Email"
46
- aria-label =" Email"
47
- />
48
- </div >
49
- <div >
50
- <label
51
- class =" block text-lg text-primary-dark dark:text-primary-light mb-2"
52
- for =" subject"
53
- >Subject</label
54
- >
55
- <input
56
- 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"
57
- id =" subject"
58
- name =" subject"
59
- type =" text"
60
- required =" "
61
- placeholder =" Subject"
62
- aria-label =" Subject"
63
- />
64
- </div >
18
+ <FormInput label =" Full Name" inputIdentifier =" name" />
19
+ <FormInput
20
+ label =" Email"
21
+ inputIdentifier =" email"
22
+ inputType =" email"
23
+ />
24
+ <FormInput label =" Subject" inputIdentifier =" subject" />
65
25
66
26
<div >
67
27
<label
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
+ inputIdentifier: {
9
+ type: String ,
10
+ default: ' ' ,
11
+ },
12
+ val: {
13
+ type: [String , Number ],
14
+ default: ' ' ,
15
+ },
16
+ inputType: {
17
+ type: String ,
18
+ default: ' text' ,
19
+ },
20
+ },
21
+ };
22
+ </script >
23
+
24
+ <template >
25
+ <div >
26
+ <label
27
+ class =" block mb-2 text-lg text-primary-dark dark:text-primary-light"
28
+ :for =" label"
29
+ >{{ label }}</label
30
+ >
31
+ <input
32
+ class =" w-full px-5 py-3 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"
33
+ :id =" inputIdentifier"
34
+ :name =" inputIdentifier"
35
+ :placeholder =" label"
36
+ :aria-label =" inputIdentifier"
37
+ required
38
+ v-bind =" $attrs"
39
+ :value =" val"
40
+ @input =" $emit('update:val', $event.target.value)"
41
+ :type =" inputType"
42
+ />
43
+ </div >
44
+ </template >
45
+
46
+ <style lang="scss" scoped></style >
You can’t perform that action at this time.
0 commit comments