Commit 127c4b5a authored by Mike Greiling's avatar Mike Greiling

Fix remaining GlDropdown usage

parent e6d9271c
<script>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import allVersionsMixin from '../../mixins/all_versions';
import { findVersionId } from '../../utils/design_management_utils';
export default {
components: {
GlDropdown,
GlDropdownItem,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
},
mixins: [allVersionsMixin],
computed: {
......@@ -50,8 +50,8 @@ export default {
</script>
<template>
<gl-dropdown :text="dropdownText" variant="link" class="design-version-dropdown">
<gl-dropdown-item v-for="(version, index) in allVersions" :key="version.node.id">
<gl-deprecated-dropdown :text="dropdownText" variant="link" class="design-version-dropdown">
<gl-deprecated-dropdown-item v-for="(version, index) in allVersions" :key="version.node.id">
<router-link
class="d-flex js-version-link"
:to="{ path: $route.path, query: { version: findVersionId(version.node.id) } }"
......@@ -71,6 +71,6 @@ export default {
class="fa fa-check float-right gl-mr-2"
></i>
</router-link>
</gl-dropdown-item>
</gl-dropdown>
</gl-deprecated-dropdown-item>
</gl-deprecated-dropdown>
</template>
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Design management design version dropdown component renders design version dropdown button 1`] = `
<gl-dropdown-stub
<gl-deprecated-dropdown-stub
class="design-version-dropdown"
issueiid=""
projectpath=""
text="Showing Latest Version"
variant="link"
>
<gl-dropdown-item-stub>
<gl-deprecated-dropdown-item-stub>
<router-link-stub
class="d-flex js-version-link"
to="[object Object]"
......@@ -31,8 +31,8 @@ exports[`Design management design version dropdown component renders design vers
class="fa fa-check float-right gl-mr-2"
/>
</router-link-stub>
</gl-dropdown-item-stub>
<gl-dropdown-item-stub>
</gl-deprecated-dropdown-item-stub>
<gl-deprecated-dropdown-item-stub>
<router-link-stub
class="d-flex js-version-link"
to="[object Object]"
......@@ -51,19 +51,19 @@ exports[`Design management design version dropdown component renders design vers
<!---->
</router-link-stub>
</gl-dropdown-item-stub>
</gl-dropdown-stub>
</gl-deprecated-dropdown-item-stub>
</gl-deprecated-dropdown-stub>
`;
exports[`Design management design version dropdown component renders design version list 1`] = `
<gl-dropdown-stub
<gl-deprecated-dropdown-stub
class="design-version-dropdown"
issueiid=""
projectpath=""
text="Showing Latest Version"
variant="link"
>
<gl-dropdown-item-stub>
<gl-deprecated-dropdown-item-stub>
<router-link-stub
class="d-flex js-version-link"
to="[object Object]"
......@@ -86,8 +86,8 @@ exports[`Design management design version dropdown component renders design vers
class="fa fa-check float-right gl-mr-2"
/>
</router-link-stub>
</gl-dropdown-item-stub>
<gl-dropdown-item-stub>
</gl-deprecated-dropdown-item-stub>
<gl-deprecated-dropdown-item-stub>
<router-link-stub
class="d-flex js-version-link"
to="[object Object]"
......@@ -106,6 +106,6 @@ exports[`Design management design version dropdown component renders design vers
<!---->
</router-link-stub>
</gl-dropdown-item-stub>
</gl-dropdown-stub>
</gl-deprecated-dropdown-item-stub>
</gl-deprecated-dropdown-stub>
`;
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