2017-11-10 23:41:04 +00:00
|
|
|
<script>
|
2020-10-15 15:08:45 +00:00
|
|
|
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
|
2018-10-29 08:01:50 +00:00
|
|
|
|
2018-10-30 20:28:31 +00:00
|
|
|
export default {
|
|
|
|
name: 'CollapsedCalendarIcon',
|
|
|
|
directives: {
|
2020-10-15 15:08:45 +00:00
|
|
|
GlTooltip: GlTooltipDirective,
|
2018-10-30 20:28:31 +00:00
|
|
|
},
|
2020-08-21 09:10:08 +00:00
|
|
|
components: {
|
|
|
|
GlIcon,
|
|
|
|
},
|
2018-10-30 20:28:31 +00:00
|
|
|
props: {
|
|
|
|
containerClass: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
2018-10-29 08:01:50 +00:00
|
|
|
},
|
2018-10-30 20:28:31 +00:00
|
|
|
text: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
2017-11-10 23:41:04 +00:00
|
|
|
},
|
2018-10-30 20:28:31 +00:00
|
|
|
showIcon: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: true,
|
2017-11-10 23:41:04 +00:00
|
|
|
},
|
2018-10-30 20:28:31 +00:00
|
|
|
tooltipText: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
click() {
|
|
|
|
this.$emit('click');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2017-11-10 23:41:04 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2020-10-15 15:08:45 +00:00
|
|
|
<div v-gl-tooltip.left.viewport :class="containerClass" :title="tooltipText" @click="click">
|
2020-08-21 09:10:08 +00:00
|
|
|
<gl-icon v-if="showIcon" name="calendar" />
|
2017-11-10 23:41:04 +00:00
|
|
|
<slot>
|
2018-11-16 20:07:38 +00:00
|
|
|
<span> {{ text }} </span>
|
2017-11-10 23:41:04 +00:00
|
|
|
</slot>
|
|
|
|
</div>
|
|
|
|
</template>
|