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