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

listbox_input.stories.js « listbox_input « 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: 4106de371cb49efddb08e701daf1635ba8b3dcf4 (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
import ListboxInput from './listbox_input.vue';

export default {
  component: ListboxInput,
  title: 'vue_shared/listbox_input',
};

const Template = (args, { argTypes }) => ({
  components: { ListboxInput },
  data() {
    return { selected: null };
  },
  props: Object.keys(argTypes),
  template: '<listbox-input v-model="selected" v-bind="$props" />',
});

export const Default = Template.bind({});
Default.args = {
  name: 'input_name',
  defaultToggleText: 'Select an option',
  items: [
    { text: 'Option 1', value: '1' },
    { text: 'Option 2', value: '2' },
    { text: 'Option 3', value: '3' },
  ],
};