Skip to content

Commit ec71786

Browse files
committed
section header component
1 parent 1e72c8a commit ec71786

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<template>
2+
<div class="flex justify-between items-center w-full my-4 lg:mb-0">
3+
<h1 class="text-3xl md:hidden text-gray-matcha capitalize">{{ name }}</h1>
4+
<div class="md:hidden sort-button rounded-md text-lg w-12">
5+
<h1 class="noSelect">←</h1>
6+
</div>
7+
</div>
8+
</template>
9+
10+
<script>
11+
export default {
12+
props: ['name'],
13+
};
14+
</script>

frontend/src/views/app/Settings.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@
2222
</div>
2323
</section>
2424
<section v-if="getShow === 'account'" class="flex flex-col items-start z-10 absolute bg-white-matcha px-8 pb-4 w-full top-0 left-0 h-screen md:h-auto md:ml-4 md:relative md:shadow-md md:rounded-md">
25-
<div class="flex justify-between items-center w-full my-4 lg:mb-0">
26-
<h1 class="text-3xl md:hidden text-gray-matcha">Account</h1>
27-
<div class="md:hidden sort-button rounded-md text-lg w-12" v-on:click="closeSetting()">
28-
<h1 class="noSelect">←</h1>
29-
</div>
30-
</div>
25+
<SectionHeader v-bind:name="'account'" v-on:click.native="closeSetting()"></SectionHeader>
3126
<AccountInput
3227
v-bind:name="'First Name'"
3328
v-bind:type="'firstName'"
@@ -56,6 +51,7 @@
5651
<script>
5752
import NavBar from '@/components/shared/NavBar.vue';
5853
import MenuButton from '@/components/app/settings/MenuButton.vue';
54+
import SectionHeader from '@/components/app/settings/SectionHeader.vue';
5955
import AccountInput from '@/components/app/settings/AccountInput.vue';
6056
import imageMan from '../../assets/recommendations/avatars/man1.png';
6157
import imageWoman from '../../assets/recommendations/avatars/woman1.png';
@@ -66,6 +62,7 @@ export default {
6662
NavBar,
6763
MenuButton,
6864
AccountInput,
65+
SectionHeader,
6966
},
7067
data: () => ({
7168
userInfo: {},

0 commit comments

Comments
 (0)