debian-mirror-gitlab/app/assets/javascripts/webhooks/components/test_dropdown.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
730 B
Vue
Raw Normal View History

2023-04-23 21:23:45 +05:30
<script>
import { GlDisclosureDropdown } from '@gitlab/ui';
import { __ } from '~/locale';
export default {
name: 'HookTestDropdown',
components: {
GlDisclosureDropdown,
},
props: {
items: {
type: Array,
required: true,
},
size: {
type: String,
required: false,
default: undefined,
},
},
computed: {
2023-06-20 00:43:36 +05:30
webhookTriggers() {
return this.items.map(({ text, href }) => ({
text,
href,
extraAttrs: {
'data-method': 'post',
},
2023-04-23 21:23:45 +05:30
}));
},
},
i18n: {
test: __('Test'),
},
};
</script>
<template>
2023-06-20 00:43:36 +05:30
<gl-disclosure-dropdown :toggle-text="$options.i18n.test" :items="webhookTriggers" :size="size" />
2023-04-23 21:23:45 +05:30
</template>