-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBar.vue
62 lines (59 loc) · 2.15 KB
/
Bar.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
<template>
<div>
<transition appear>
<template v-if="backdrop">
<div class="modal-backdrop cc-cookie-bar__backdrop"></div>
</template>
</transition>
<transition appear>
<div class="cc-cookie-bar" :class="classes">
<div class="container">
<div class="row align-items-center">
<div class="col-md">
<slot name="message" />
</div>
<div class="col-md-auto mt-2 mt-md-0">
<div class="row align-items-center justify-content-end">
<template v-if="manage">
<div class="col-auto">
<button class="btn btn-link btn-sm cc-cookie-bar__link px-0" v-b-modal.manage-cookies><slot name="manage-link" /></button>
</div>
</template>
<div class="col-auto">
<form method="post" :action="endpoint">
<button type="submit" class="btn btn-primary btn-lg cc-cookie-bar__btn"><slot name="accept-button" /></button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</transition>
</div>
</template>
<script>
import ManageForm from "./ManageForm";
import { VBModal } from 'bootstrap-vue';
export default {
components: {
ManageForm,
},
props: {
endpoint: String,
manage: Boolean,
backdrop: Boolean,
},
computed: {
classes() {
return {
'cc-cookie-bar--modal container': this.backdrop,
}
}
},
directives: {
'b-modal': VBModal,
}
}
</script>
<style src="../../scss/components/_bar.scss" lang="scss"></style>