Vue Play
Play and demonstrate your Vue components, inspired by react-storybook.
Play it in seconds
The only thing you need to install is vue-play-cli
:
$ npm install -g vue-play-cli
Then, let's play with your Button component, create a play.js
in the root directory of your project (anywhere else is ok):
import {play} from 'vue-play'
import MyButton from './components/MyButton.vue'
play({
Button: {
'with text'(h) {
return <MyButton>Hello Play!</MyButton>
},
'with rounded border'(h) {
return <MyButton rounded={true}>I'm rouned!</MyButton>
}
}
})
Run the play script with command vue-play
, and see it in action! (code)
$ ~/my-button-component vue-play
> play at http://localhost:5000
License
MIT © EGOIST