0.0.25 • Published 2 years ago
nuxt-simple-stories v0.0.25
Nuxt Simple Stories
Simple stories for Nuxt. Work on your components in isolation with zero configuration. Also enabled in your Nuxt DevTools
Getting Started
Installation
pnpm add -D nuxt-simple-stories
export default defineNuxtConfig({
modules: [
'nuxt-simple-stories'
],
// optional configuration
simpleStories: {
// Set to false to deploy stories to production. (default: true)
devOnly: true,
}
})
Usage
Create a stories
folder in the root of your Nuxt project. Create a *.story.vue
file for each story you want to create. The name of the file will be used as the name of the story. Directories will be used to show a tree view in the UI.
<script setup lang="ts">
// this is just another Nuxt 3 component, so you can use all the same features like auto imports, Pinia store, etc.
</script>
<template>
<Variant title="Base Button">
<BaseButton variant="primary">
Primary Button
</BaseButton>
<BaseButton variant="secondary">
Secondary Buttton
</BaseButton>
</Variant>
<Variant title="Disabled buttons">
<BaseButton
variant="primary"
disabled
>
Primary Button
</BaseButton>
<BaseButton
variant="secondary"
disabled
>
Secondary Buttton
</BaseButton>
</Variant>
</template>
The Variant
component can be used to group for example different states of a component. The title
prop will be used as the name of the variant.
0.0.25
2 years ago
0.0.24
2 years ago
0.0.23
2 years ago
0.0.22
2 years ago
0.0.21
2 years ago
0.0.20
2 years ago
0.0.19
2 years ago
0.0.18
2 years ago
0.0.17
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.9
2 years ago
0.0.6
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago