summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/components/dropdown/dropdown_widget/dropdown_widget.stories.js
blob: a48b8bcfa8e055281984f53b8471f2cde83d62f0 (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
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',
};