⚠️⚠️ 此仓库不再维护 ⚠️⚠️
@socheatsok78/storybook-addon-vuetify
📓 Storybook 的 Vuetify 🐉 插件
安装
yarn add -D @socheatsok78/storybook-addon-vuetify
用法
将 @socheatsok78/storybook-addon-vuetify
插件添加到 .storybook/main.js
module.exports = {
addons: [
'@socheatsok78/storybook-addon-vuetify'
]
}
将 vueitfy
修饰器添加到 .storybook/preview.js
import { withVuetify } from '@socheatsok78/storybook-addon-vuetify/dist/decorators'
export const decorators = [
withVuetify
]
你可以添加 withThemeProvider
来使用 vuetify
主题设置。但请确保按所示方式添加 globalTypes
。
import { withVuetify, withThemeProvider } from '@socheatsok78/storybook-addon-vuetify/dist/decorators'
export const globalTypes = {
theme: {
name: 'Theme',
description: 'Global theme for components',
defaultValue: 'light',
toolbar: {
icon: 'circlehollow',
items: ['light', 'dark']
}
}
}
export const decorators = [
withThemeProvider,
withVuetify
]
许可证
根据 MIT 许可证 获得许可。