forked from EnergySage/es-ds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEsNavBarAccountMenu.vue
72 lines (70 loc) · 2.41 KB
/
EsNavBarAccountMenu.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
<div class="icon-dropdown">
<div class="nav-item">
<div class="nav-link dropdown-toggle d-none d-lg-flex flex-nowrap py-100">
<IconPerson
class="align-self-center account-icon"
width="20px"
height="20px" />
<span class="sr-only">
{{ loggedOut.menuButtonText }}
</span>
</div>
<div class="menu">
<ul
class="loggedIn dropdown-menu account-menu rounded mt-0 py-100 list-unstyled"
style="display: none">
<li
v-for="item in authItems"
:key="item.name">
<es-nav-bar-link
class="dropdown-item nav-link"
:href="item.link">
<span class="mx-50">
{{ item.name }}
</span>
</es-nav-bar-link>
</li>
</ul>
<ul
class="loggedOut dropdown-menu account-menu rounded mt-0"
style="display: none">
<li class="d-flex justify-content-center">
<EsButton
:href="loggedOut.signIn.link"
class="m-100 w-100 text-white font-weight-bold">
{{ loggedOut.signIn.name }}
</EsButton>
</li>
<li class="d-flex justify-content-center">
<EsButton
:href="loggedOut.createAccount.link"
:outline="true"
class="mx-100 w-100 font-weight-bold">
{{ loggedOut.createAccount.name }}
</EsButton>
</li>
</ul>
</div>
</div>
</div>
</template>
<script lang="js">
import EsNavBarLink from './EsNavBarLink.vue';
export default {
name: 'EsNavBarAccountMenu',
components: {
EsNavBarLink,
},
props: {
authItems: {
type: Array,
default: () => [],
},
loggedOut: {
type: Object,
required: true,
},
},
};
</script>