Created
February 15, 2019 18:50
-
-
Save fostergn/a07db20d59e2d52256d7163892c766e5 to your computer and use it in GitHub Desktop.
Storybook Component with Store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { storiesOf } from '@storybook/vue' | |
import { withKnobs, text, object } from '@storybook/addon-knobs' | |
import store from '../store' | |
import '../styles/global.scss' | |
import Login from '@/components/Login' | |
import DataWrapper from '@/stories/DataWrapper' | |
import { initializeApi } from '@knack/api' | |
window.Knack.Api = initializeApi(ACCOUNT, PASSWORD) | |
storiesOf(`List Fields`, module) | |
.add(`Login`, () => ({ | |
store, | |
components: { | |
Login, | |
DataWrapper | |
}, | |
template: ` | |
<DataWrapper | |
:accountName="testAccountName" | |
:appName="testAppName" | |
> | |
<Login /> | |
</DataWrapper> | |
` | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment