My issue is how to use Storybook Components in Laravel-Vue application. I've tried to extract Storybook to static app and import it in second application but it dosen't work. I used
and
I'd like to automatically import all storybook, not manually a few components. I would be grateful for any help. :)
problem solved!
Firstly: in file index.js in storybook's files you must export components
import MyComponent from './src/components/MyComponent.vue';
export default {
MyComponent
}
Secondly: push all project to e.g. git or as npm package.
Thirdly: Import storybook to another project in package.json in
dependencies
"dependencies": {
"storybook": "git+http://path-to-project-with-storybook"
}
next run npm update
Fourthly: import components from storybook in js file in your project
import storybook from 'storybook'
export default {
name: 'app',
components: {
MyComponent : storybook.MyComponent,
}
}