2018-02-06 02:36:22 +00:00
|
|
|
<template>
|
|
|
|
<v-app>
|
|
|
|
<v-container fluid>
|
2018-07-12 12:03:50 +00:00
|
|
|
<div class="main">
|
|
|
|
<h1>Welcome to STORYBOOK</h1>
|
|
|
|
<p>
|
|
|
|
This is a UI component dev environment for your app.
|
|
|
|
</p>
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-11-24 18:49:19 +00:00
|
|
|
<p>
|
|
|
|
The repo for this project exists here
|
2018-07-12 12:03:50 +00:00
|
|
|
<a
|
|
|
|
class="link"
|
|
|
|
href="https://github.com/white-rabbit-japan/vuetify-storyboard-boilerplate"
|
|
|
|
target="_blank"
|
2018-08-31 20:34:12 +00:00
|
|
|
rel="noopener noreferrer"
|
|
|
|
>
|
2018-07-12 12:03:50 +00:00
|
|
|
vuetify-storyboard-boilerplate
|
|
|
|
</a>
|
|
|
|
</p>
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-07-12 12:03:50 +00:00
|
|
|
<p>
|
|
|
|
We've added some basic stories inside the
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-11-24 18:49:19 +00:00
|
|
|
<code class="code">
|
|
|
|
src/stories
|
|
|
|
</code>
|
2018-07-12 12:03:50 +00:00
|
|
|
directory.
|
|
|
|
A story is a single state of one or more UI components. You can have as many stories as you want.
|
|
|
|
(Basically a story is like a visual test case.)
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
See these sample
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-11-24 18:49:19 +00:00
|
|
|
<a class="link" role="button" tabIndex="0" @click.prevent="showApp">
|
|
|
|
stories
|
|
|
|
</a>
|
2018-07-12 12:03:50 +00:00
|
|
|
for a component called
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-11-24 18:49:19 +00:00
|
|
|
<code class="code">
|
|
|
|
Button
|
|
|
|
</code> .
|
2018-07-12 12:03:50 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Just like that, you can add your own components as stories.
|
|
|
|
You can also edit those components and see changes right away.
|
|
|
|
(Try editing the
|
2018-11-24 18:49:19 +00:00
|
|
|
<code class="code">
|
|
|
|
Button
|
|
|
|
</code> component located at
|
|
|
|
<code class="code">
|
|
|
|
src/stories/Button.js
|
|
|
|
</code>.)
|
2018-07-12 12:03:50 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
This is just one thing you can do with Storybook.
|
|
|
|
Have a look at the
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-07-12 12:03:50 +00:00
|
|
|
<a class="link" href="https://github.com/storybooks/storybook" target="_blank" rel="noopener noreferrer">
|
|
|
|
Storybook
|
|
|
|
</a>
|
|
|
|
repo for more information.
|
|
|
|
</p>
|
|
|
|
<p class="note">
|
|
|
|
<b>NOTE:</b>
|
|
|
|
Have a look at the
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-11-24 18:49:19 +00:00
|
|
|
<code class="code">
|
|
|
|
.storybook/webpack.config.js
|
|
|
|
</code>
|
2018-07-12 12:03:50 +00:00
|
|
|
to add webpack loaders and plugins you are using in this project.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</v-container>
|
2018-02-06 02:36:22 +00:00
|
|
|
</v-app>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-07-12 12:03:50 +00:00
|
|
|
name: 'Welcome',
|
2018-02-06 02:36:22 +00:00
|
|
|
|
|
|
|
props: {
|
|
|
|
showApp: {
|
|
|
|
type: Function,
|
2018-02-06 03:06:45 +00:00
|
|
|
default: () => console.log('Welcome to storybook!') // eslint-disable-line
|
2018-02-06 02:36:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.main {
|
|
|
|
margin: 15px;
|
|
|
|
max-width: 600px;
|
|
|
|
line-height: 1.4;
|
|
|
|
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans,
|
|
|
|
sans-serif;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.link {
|
|
|
|
color: #1474f3;
|
|
|
|
text-decoration: none;
|
|
|
|
border-bottom: 1px solid #1474f3;
|
|
|
|
padding-bottom: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.code {
|
|
|
|
font-size: 15px;
|
|
|
|
font-weight: 600;
|
|
|
|
padding: 2px 5px;
|
|
|
|
border: 1px solid #eae9e9;
|
|
|
|
border-radius: 4px;
|
|
|
|
background-color: #f3f2f2;
|
|
|
|
color: #3a3a3a;
|
|
|
|
}
|
|
|
|
|
|
|
|
.note {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
</style>
|