Remove Storybook files and packages (#15040)
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
import { storiesOf } from '@storybook/vue';
|
||||
import { withKnobs } from '@storybook/addon-knobs';
|
||||
|
||||
import CheckList from './checklist.vue';
|
||||
|
||||
const stories = storiesOf('CheckList', module);
|
||||
|
||||
stories.addDecorator(withKnobs);
|
||||
|
||||
stories
|
||||
.add('simple', () => ({
|
||||
components: { CheckList },
|
||||
template: `
|
||||
<div style="position: absolute; margin: 20px; background: white">
|
||||
<check-list :items.sync="checklist">
|
||||
|
||||
</check-list>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
Data: <br/>
|
||||
{{ checklist }}
|
||||
</div>
|
||||
`,
|
||||
data () {
|
||||
return {
|
||||
checklist: [
|
||||
{
|
||||
id: 'c0890cd2-3c69-4889-bf2c-b63ac0ee6628',
|
||||
text: 'first',
|
||||
completed: false,
|
||||
},
|
||||
{
|
||||
id: '5b913020-b340-4099-9a53-afcd27dc5637',
|
||||
text: 'second',
|
||||
completed: true,
|
||||
},
|
||||
{
|
||||
id: '77b52a8e-4a0e-4717-9650-55fb5462b42f',
|
||||
text: 'third',
|
||||
completed: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
}));
|
||||
@@ -1,124 +0,0 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { storiesOf } from '@storybook/vue';
|
||||
import { withKnobs, number } from '@storybook/addon-knobs';
|
||||
|
||||
import MultiList from './multiList';
|
||||
import SelectMulti from './selectMulti';
|
||||
|
||||
const stories = storiesOf('Multiple Select List', module);
|
||||
|
||||
stories.addDecorator(withKnobs);
|
||||
|
||||
const exampleTagList = [
|
||||
1, 2, 3,
|
||||
];
|
||||
|
||||
const allTags = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Small Tag',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'This is a long tag',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'This is a long tag',
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: 'This is a different tag',
|
||||
},
|
||||
{
|
||||
id: 9001,
|
||||
name: 'OVER 9000',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'Four',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: 'Five :tada:',
|
||||
challenge: true,
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: 'Six',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: 'Seven **Markdown**',
|
||||
},
|
||||
];
|
||||
|
||||
stories
|
||||
.add('tag-list', () => ({
|
||||
components: { MultiList },
|
||||
template: `
|
||||
<div style="position: absolute; margin: 20px">
|
||||
<MultiList :max-items="maxTags" :items="tagList"></MultiList>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
tagList: {
|
||||
default: allTags,
|
||||
},
|
||||
maxTags: {
|
||||
default: number('Max-Tags', 3),
|
||||
},
|
||||
},
|
||||
}))
|
||||
.add('select-tag', () => ({
|
||||
components: { SelectMulti },
|
||||
template: `
|
||||
<div style="position: absolute; margin: 20px">
|
||||
<SelectMulti :selectedItems="tagList"
|
||||
:add-new="true"
|
||||
:all-items="allTags"
|
||||
style="width: 400px"
|
||||
@changed="tagList = $event"
|
||||
@addNew="added = $event">
|
||||
|
||||
</SelectMulti>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
Added event: {{ added }}
|
||||
</div>
|
||||
`,
|
||||
data () {
|
||||
return {
|
||||
tagList: exampleTagList,
|
||||
added: '',
|
||||
};
|
||||
},
|
||||
props: {
|
||||
allTags: {
|
||||
default: allTags,
|
||||
},
|
||||
},
|
||||
}))
|
||||
.add('longer select-tag', () => ({
|
||||
components: { SelectMulti },
|
||||
template: `
|
||||
<div style="position: absolute; margin: 20px">
|
||||
<SelectMulti :selectedItems="tagList"
|
||||
:all-items="allTags"
|
||||
style="width: 400px"
|
||||
@changed="tagList = $event"></SelectMulti>
|
||||
</div>
|
||||
`,
|
||||
data () {
|
||||
return {
|
||||
tagList: [],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
allTags: {
|
||||
default: allTags,
|
||||
},
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user