Skip to content

Commit 623ed48

Browse files
committed
Use reuseable form input in hire me modal
1 parent ea6a124 commit 623ed48

File tree

1 file changed

+35
-46
lines changed

1 file changed

+35
-46
lines changed

src/components/HireMeModal.vue

+35-46
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<script>
22
import feather from 'feather-icons';
33
import Button from './reusable/Button.vue';
4+
import FormInput from './reusable/FormInput.vue';
45
export default {
56
props: ['showModal', 'modal', 'categories'],
6-
components: { Button },
7+
components: { Button, FormInput },
78
data() {
89
return {};
910
},
@@ -36,13 +37,13 @@ export default {
3637
class="modal-wrapper flex items-center z-30"
3738
>
3839
<div
39-
class="modal max-w-md mx-5 xl:max-w-xl lg:max-w-xl md:max-w-xl bg-secondary-light dark:bg-primary-dark max-h-screen shadow-lg flex-row rounded-lg relative"
40+
class="modal max-w-md mx-5 md:max-w-xl bg-secondary-light dark:bg-primary-dark max-h-screen shadow-lg flex-row rounded-lg relative"
4041
>
4142
<div
4243
class="modal-header flex justify-between gap-10 p-5 border-b border-ternary-light dark:border-ternary-dark"
4344
>
4445
<h5
45-
class=" text-primary-dark dark:text-primary-light text-xl"
46+
class="text-primary-dark dark:text-primary-light text-xl"
4647
>
4748
What project are you looking for?
4849
</h5>
@@ -55,33 +56,27 @@ export default {
5556
</div>
5657
<div class="modal-body p-5 w-full h-full">
5758
<form class="max-w-xl m-4 text-left">
58-
<div class="mt-0">
59-
<input
60-
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"
61-
id="name"
62-
name="name"
63-
type="text"
64-
required=""
65-
placeholder="Name"
66-
aria-label="Name"
67-
/>
68-
</div>
69-
<div class="mt-6">
70-
<input
71-
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"
72-
id="email"
73-
name="email"
74-
type="text"
75-
required=""
76-
placeholder="Email"
77-
aria-label="Email"
78-
/>
79-
</div>
59+
<FormInput
60+
label="Full Name"
61+
inputIdentifier="name"
62+
class="mb-2"
63+
/>
64+
<FormInput
65+
label="Email"
66+
inputIdentifier="email"
67+
inputType="email"
68+
/>
69+
8070
<div class="mt-6">
71+
<label
72+
class="block mb-2 text-lg text-primary-dark dark:text-primary-light"
73+
for="project"
74+
>Project Type</label
75+
>
8176
<select
82-
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"
83-
id="subject"
84-
name="subject"
77+
class="w-full px-5 py-3 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"
78+
id="project"
79+
name="project"
8580
type="text"
8681
required=""
8782
aria-label="Project Category"
@@ -90,16 +85,22 @@ export default {
9085
v-for="category in categories"
9186
:key="category.id"
9287
:value="category.value"
93-
>{{ category.name }}</option
9488
>
89+
{{ category.name }}
90+
</option>
9591
</select>
9692
</div>
9793

9894
<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+
>
99100
<textarea
100101
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"
101-
id="message"
102-
name="message"
102+
id="details"
103+
name="details"
103104
cols="14"
104105
rows="6"
105106
aria-label="Details"
@@ -110,15 +111,7 @@ export default {
110111
<div class="mt-6 pb-4 sm:pb-1">
111112
<Button
112113
title="Send Request"
113-
class="px-4
114-
sm:px-6
115-
py-2
116-
sm:py-2.5
117-
text-white
118-
bg-indigo-500
119-
hover:bg-indigo-600
120-
rounded-md
121-
focus:ring-1 focus:ring-indigo-900 duration-500"
114+
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"
122115
type="submit"
123116
aria-label="Submit Request"
124117
/>
@@ -130,11 +123,7 @@ export default {
130123
>
131124
<Button
132125
title="Close"
133-
class=" px-4
134-
sm:px-6
135-
py-2 bg-gray-600 text-primary-light hover:bg-ternary-dark dark:bg-gray-200 dark:text-secondary-dark dark:hover:bg-primary-light
136-
rounded-md
137-
focus:ring-1 focus:ring-indigo-900 duration-500"
126+
class="px-4 sm:px-6 py-2 bg-gray-600 text-primary-light hover:bg-ternary-dark dark:bg-gray-200 dark:text-secondary-dark dark:hover:bg-primary-light rounded-md focus:ring-1 focus:ring-indigo-900 duration-500"
138127
@click="showModal()"
139128
aria-label="Close Modal"
140129
/>
@@ -149,7 +138,7 @@ export default {
149138

150139
<style scoped>
151140
.modal-body {
152-
max-height: 500px;
141+
max-height: 570px;
153142
}
154143
.bg-gray-800-opacity {
155144
background-color: #2d374850;

0 commit comments

Comments
 (0)