Commit a3589f34 authored by Amelia Bauerly's avatar Amelia Bauerly Committed by Nicolò Maria Mezzopera

Replacing vue shared tooltip on calendar icon

parent 0fe59e92
<script> <script>
import { GlIcon } from '@gitlab/ui'; import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip';
export default { export default {
name: 'CollapsedCalendarIcon', name: 'CollapsedCalendarIcon',
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
GlIcon, GlIcon,
...@@ -41,16 +40,7 @@ export default { ...@@ -41,16 +40,7 @@ export default {
</script> </script>
<template> <template>
<div <div v-gl-tooltip.left.viewport :class="containerClass" :title="tooltipText" @click="click">
v-tooltip
:class="containerClass"
:title="tooltipText"
data-container="body"
data-placement="left"
data-html="true"
data-boundary="viewport"
@click="click"
>
<gl-icon v-if="showIcon" name="calendar" /> <gl-icon v-if="showIcon" name="calendar" />
<slot> <slot>
<span> {{ text }} </span> <span> {{ text }} </span>
......
---
title: Replacing vue shared tooltip on calendar icon
merge_request: 45059
author:
type: other
...@@ -80,7 +80,7 @@ describe('collapsedGroupedDatePicker', () => { ...@@ -80,7 +80,7 @@ describe('collapsedGroupedDatePicker', () => {
it('should have tooltip as `Start and due date`', () => { it('should have tooltip as `Start and due date`', () => {
const icons = vm.$el.querySelectorAll('.sidebar-collapsed-icon'); const icons = vm.$el.querySelectorAll('.sidebar-collapsed-icon');
expect(icons[0].dataset.originalTitle).toBe('Start and due date'); expect(icons[0].title).toBe('Start and due date');
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment