⚠️⚠️ 此仓库不再维护 ⚠️⚠️
@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'
]
}
将 vuetify
装饰器添加到 .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 许可证 授权。