import { storiesOf } from '@storybook/vue' import { withA11y } from '@storybook/addon-a11y' import { action } from '@storybook/addon-actions' import helpers from '~/storybook/helpers' import FollowList from './FollowList.vue' helpers.init() const user = { name: 'Jenny Rostock', id: 'u3', followedByCount: 12, followedBy: helpers.fakeUser(7), followingCount: 28, following: helpers.fakeUser(7), } const allConnectionsUser = { ...user, followedBy: [...user.followedBy, ...helpers.fakeUser(5)], following: [...user.following, ...helpers.fakeUser(21)], } const noConnectionsUser = { ...user, followedBy: [], followedByCount: 0, following: [], followingCount: 0, } storiesOf('FollowList', module) .addDecorator(withA11y) .addDecorator(helpers.layout) .add('without connections', () => { return { components: { FollowList }, store: helpers.store, data() { return { user: noConnectionsUser } }, template: `