blob: 104f0b12b8c130d57ebbcc3c1af3b7bd21bc9fa7 (
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 { storiesOf } from '@storybook/angular';
import { action } from '@storybook/addon-actions';
import { boolean, text, array } from '@storybook/addon-knobs/angular';
import { NgSelectModule } from '@ng-select/ng-select';
storiesOf('select-autocomplete', module).add('select', () => ({
template: `
<ng-select [items]="cities"
bindLabel="name"
bindValue="id"
placeholder="Select city"
[(ngModel)]="selectedCityId">
</ng-select>
`,
props: {
cities: array('cities', [
{ id: 1, name: 'Vilnius' },
{ id: 2, name: 'Kaunas' },
{ id: 3, name: 'Pabradė' }
])
},
moduleMetadata: {
imports: [NgSelectModule]
}
}));
|