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
|
<script>
import { GlDrawer, GlButton } from '@gitlab/ui';
import { getContentWrapperHeight } from '~/lib/utils/dom_utils';
import { DRAWER_CONTAINER_CLASS, i18n } from './constants';
export default {
i18n,
components: {
GlDrawer,
GlButton,
},
props: {
isVisible: {
type: Boolean,
required: false,
default: false,
},
zIndex: {
type: Number,
required: false,
default: 200,
},
},
computed: {
drawerHeightOffset() {
return getContentWrapperHeight(DRAWER_CONTAINER_CLASS);
},
},
methods: {
closeDrawer() {
this.$emit('close-job-assistant-drawer');
},
},
};
</script>
<template>
<gl-drawer
class="job-assistant-drawer"
:header-height="drawerHeightOffset"
:open="isVisible"
:z-index="zIndex"
@close="closeDrawer"
>
<template #title>
<h2 class="gl-m-0 gl-font-lg">{{ $options.i18n.ADD_JOB }}</h2>
</template>
<template #footer>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
category="primary"
class="gl-mr-3"
data-testid="cancel-button"
@click="closeDrawer"
>{{ __('Cancel') }}</gl-button
>
<gl-button category="primary" variant="confirm" data-testid="confirm-button">{{
__('Add')
}}</gl-button>
</div>
</template>
</gl-drawer>
</template>
|