Commit 757dd3d0 authored by Christie Lenneville's avatar Christie Lenneville Committed by Kushal Pandya
parent 93796580
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
/** /**
* Port of detail_behavior expand button. * Port of detail_behavior expand button.
...@@ -16,8 +15,7 @@ import Icon from '~/vue_shared/components/icon.vue'; ...@@ -16,8 +15,7 @@ import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'ExpandButton', name: 'ExpandButton',
components: { components: {
GlDeprecatedButton, GlButton,
Icon,
}, },
data() { data() {
return { return {
...@@ -41,25 +39,23 @@ export default { ...@@ -41,25 +39,23 @@ export default {
</script> </script>
<template> <template>
<span> <span>
<gl-deprecated-button <gl-button
v-show="isCollapsed" v-show="isCollapsed"
:aria-label="ariaLabel" :aria-label="ariaLabel"
type="button" type="button"
class="js-text-expander-prepend text-expander btn-blank" class="js-text-expander-prepend text-expander btn-blank"
icon="ellipsis_h"
@click="onClick" @click="onClick"
> />
<icon :size="12" name="ellipsis_h" />
</gl-deprecated-button>
<span v-if="isCollapsed"> <slot name="short"></slot> </span> <span v-if="isCollapsed"> <slot name="short"></slot> </span>
<span v-if="!isCollapsed"> <slot name="expanded"></slot> </span> <span v-if="!isCollapsed"> <slot name="expanded"></slot> </span>
<gl-deprecated-button <gl-button
v-show="!isCollapsed" v-show="!isCollapsed"
:aria-label="ariaLabel" :aria-label="ariaLabel"
type="button" type="button"
class="js-text-expander-append text-expander btn-blank" class="js-text-expander-append text-expander btn-blank"
icon="ellipsis_h"
@click="onClick" @click="onClick"
> />
<icon :size="12" name="ellipsis_h" />
</gl-deprecated-button>
</span> </span>
</template> </template>
...@@ -4,20 +4,22 @@ exports[`Expand button on click when short text is provided renders button after ...@@ -4,20 +4,22 @@ exports[`Expand button on click when short text is provided renders button after
<span> <span>
<button <button
aria-label="Click to expand text" aria-label="Click to expand text"
class="btn js-text-expander-prepend text-expander btn-blank btn-secondary btn-md" class="btn js-text-expander-prepend text-expander btn-blank btn-default btn-md btn-icon button-ellipsis-horizontal gl-button"
style="display: none;" style="display: none;"
type="button" type="button"
> >
<!----> <!---->
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s12 ic-ellipsis_h" data-testid="ellipsis_h-icon"
> >
<use <use
xlink:href="#ellipsis_h" href="#ellipsis_h"
/> />
</svg> </svg>
<!---->
</button> </button>
<!----> <!---->
...@@ -30,20 +32,22 @@ exports[`Expand button on click when short text is provided renders button after ...@@ -30,20 +32,22 @@ exports[`Expand button on click when short text is provided renders button after
<button <button
aria-label="Click to expand text" aria-label="Click to expand text"
class="btn js-text-expander-append text-expander btn-blank btn-secondary btn-md" class="btn js-text-expander-append text-expander btn-blank btn-default btn-md btn-icon button-ellipsis-horizontal gl-button"
style="" style=""
type="button" type="button"
> >
<!----> <!---->
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s12 ic-ellipsis_h" data-testid="ellipsis_h-icon"
> >
<use <use
xlink:href="#ellipsis_h" href="#ellipsis_h"
/> />
</svg> </svg>
<!---->
</button> </button>
</span> </span>
`; `;
...@@ -52,19 +56,21 @@ exports[`Expand button when short text is provided renders button before text 1` ...@@ -52,19 +56,21 @@ exports[`Expand button when short text is provided renders button before text 1`
<span> <span>
<button <button
aria-label="Click to expand text" aria-label="Click to expand text"
class="btn js-text-expander-prepend text-expander btn-blank btn-secondary btn-md" class="btn js-text-expander-prepend text-expander btn-blank btn-default btn-md btn-icon button-ellipsis-horizontal gl-button"
type="button" type="button"
> >
<!----> <!---->
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s12 ic-ellipsis_h" data-testid="ellipsis_h-icon"
> >
<use <use
xlink:href="#ellipsis_h" href="#ellipsis_h"
/> />
</svg> </svg>
<!---->
</button> </button>
<span> <span>
...@@ -77,20 +83,22 @@ exports[`Expand button when short text is provided renders button before text 1` ...@@ -77,20 +83,22 @@ exports[`Expand button when short text is provided renders button before text 1`
<button <button
aria-label="Click to expand text" aria-label="Click to expand text"
class="btn js-text-expander-append text-expander btn-blank btn-secondary btn-md" class="btn js-text-expander-append text-expander btn-blank btn-default btn-md btn-icon button-ellipsis-horizontal gl-button"
style="display: none;" style="display: none;"
type="button" type="button"
> >
<!----> <!---->
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s12 ic-ellipsis_h" data-testid="ellipsis_h-icon"
> >
<use <use
xlink:href="#ellipsis_h" href="#ellipsis_h"
/> />
</svg> </svg>
<!---->
</button> </button>
</span> </span>
`; `;
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