Commit 93c82a3a authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '233602-vuln-state-dropdown' into 'master'

Migrate dropdown and button instances in vulnerability state dropdown

Closes #233602

See merge request gitlab-org/gitlab!41828
parents 9733c5b7 d889f7a3
<script>
import { GlDeprecatedDropdown, GlIcon, GlDeprecatedButton } from '@gitlab/ui';
import { GlDropdown, GlIcon, GlButton } from '@gitlab/ui';
import { VULNERABILITY_STATE_OBJECTS } from '../constants';
export default {
states: Object.values(VULNERABILITY_STATE_OBJECTS),
components: { GlDeprecatedDropdown, GlIcon, GlDeprecatedButton },
components: { GlDropdown, GlIcon, GlButton },
props: {
// Initial vulnerability state from the parent. This is used to disable the Change Status button
......@@ -56,7 +56,7 @@ export default {
</script>
<template>
<gl-deprecated-dropdown
<gl-dropdown
ref="dropdown"
menu-class="p-0"
toggle-class="text-capitalize"
......@@ -84,17 +84,17 @@ export default {
</li>
<div class="text-right p-3">
<gl-deprecated-button ref="cancel-button" class="mr-2" @click="closeDropdown">
<gl-button ref="cancel-button" class="mr-2" @click="closeDropdown">
{{ __('Cancel') }}
</gl-deprecated-button>
<gl-deprecated-button
</gl-button>
<gl-button
ref="save-button"
variant="success"
:disabled="selected === initialStateItem"
@click="saveState(selected)"
>
{{ s__('VulnerabilityManagement|Change status') }}
</gl-deprecated-button>
</gl-button>
</div>
</gl-deprecated-dropdown>
</gl-dropdown>
</template>
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