Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dropdown_widget.stories.js « dropdown_widget « dropdown « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8256d9534662b07ef9f77ca855a61e1ea008ec19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* eslint-disable @gitlab/require-i18n-strings */

import { __ } from '~/locale';
import DropdownWidget from './dropdown_widget.vue';

export default {
  component: DropdownWidget,
  title: 'vue_shared/dropdown/dropdown_widget/dropdown_widget',
};

const Template = (args, { argTypes }) => ({
  components: { DropdownWidget },
  props: Object.keys(argTypes),
  template: '<dropdown-widget v-bind="$props" v-on="$props" />',
});

export const Default = Template.bind({});
Default.args = {
  options: [
    { id: 'gid://gitlab/Milestone/-1', title: __('Any Milestone') },
    { id: 'gid://gitlab/Milestone/0', title: __('No Milestone') },
    { id: 'gid://gitlab/Milestone/-2', title: __('Upcoming') },
    { id: 'gid://gitlab/Milestone/-3', title: __('Started') },
  ],
  selectText: 'Select',
  searchText: 'Search',
};