Skip to content

Commit b35e14a

Browse files
committed
Reusabe button component in modal contact and home
1 parent 6b40680 commit b35e14a

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

src/components/HireMeModal.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
</div>
9191

9292
<div class="mt-6 pb-4 sm:pb-1">
93-
<button
93+
<Button
94+
title="Send Request"
9495
class="px-4
9596
sm:px-6
9697
py-2
@@ -104,16 +105,15 @@
104105
focus:ring-1 focus:ring-indigo-900"
105106
type="submit"
106107
aria-label="Submit Request"
107-
>
108-
Send Request
109-
</button>
108+
/>
110109
</div>
111110
</form>
112111
</div>
113112
<div
114113
class="modal-footer mt-2 sm:mt-0 py-5 px-8 border0-t text-right"
115114
>
116-
<button
115+
<Button
116+
title="Close"
117117
class=" px-4
118118
sm:px-6
119119
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
@@ -123,9 +123,7 @@
123123
focus:ring-1 focus:ring-indigo-900"
124124
@click="showModal()"
125125
aria-label="Close Modal"
126-
>
127-
Close
128-
</button>
126+
/>
129127
</div>
130128
</div>
131129
</div>
@@ -137,8 +135,10 @@
137135

138136
<script>
139137
import feather from 'feather-icons';
138+
import Button from './reusable/Button.vue';
140139
export default {
141140
props: ['showModal', 'modal', 'categories'],
141+
components: { Button },
142142
data() {
143143
return {};
144144
},

src/components/contact/ContactForm.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@
7676
</div>
7777

7878
<div class="mt-6">
79-
<button
79+
<Button
80+
title="Send Message"
8081
class="font-general-medium px-4 py-2.5 text-white font-medium tracking-wider bg-indigo-500 hover:bg-indigo-600 focus:ring-1 focus:ring-indigo-900 rounded-lg"
8182
type="submit"
8283
aria-label="Send Message"
83-
>
84-
Send Message
85-
</button>
84+
/>
8685
</div>
8786
</form>
8887
</div>
8988
</div>
9089
</template>
9190

9291
<script>
93-
export default {};
92+
import Button from '../reusable/Button.vue';
93+
export default { components: { Button } };
9494
</script>
9595

9696
<style lang="scss" scoped></style>

src/components/shared/AppHeader.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,12 @@
6969
>
7070
<!-- Hire me button -->
7171
<div class="hidden md:block">
72-
<button
72+
<Button
73+
title="Hire Me"
7374
class="text-md font-general-medium bg-indigo-500 hover:bg-indigo-600 text-white shadow-sm rounded-md px-5 py-2.5"
7475
@click="showModal()"
7576
aria-label="Hire Me Button"
76-
>
77-
Hire Me
78-
</button>
77+
/>
7978
</div>
8079

8180
<!-- Theme switcher large screen -->
@@ -102,12 +101,14 @@ import ThemeSwitcher from '../ThemeSwitcher';
102101
import HireMeModal from '../HireMeModal.vue';
103102
import feather from 'feather-icons';
104103
import AppHeaderLinks from './AppHeaderLinks.vue';
104+
import Button from '../reusable/Button.vue';
105105
106106
export default {
107107
components: {
108108
ThemeSwitcher,
109109
HireMeModal,
110110
AppHeaderLinks,
111+
Button,
111112
},
112113
data() {
113114
return {

0 commit comments

Comments
 (0)