mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Add story for AvatarMenu
This commit is contained in:
parent
49f73976b7
commit
7d0b9861b8
17
webapp/components/AvatarMenu/AvatarMenu.story.js
Normal file
17
webapp/components/AvatarMenu/AvatarMenu.story.js
Normal file
@ -0,0 +1,17 @@
|
||||
import { storiesOf } from '@storybook/vue'
|
||||
import { withA11y } from '@storybook/addon-a11y'
|
||||
import StoryRouter from 'storybook-vue-router'
|
||||
import AvatarMenu from '~/components/AvatarMenu/AvatarMenu'
|
||||
import helpers from '~/storybook/helpers'
|
||||
|
||||
helpers.init()
|
||||
|
||||
storiesOf('AvatarMenu', module)
|
||||
.addDecorator(withA11y)
|
||||
.addDecorator(helpers.layout)
|
||||
.addDecorator(StoryRouter())
|
||||
.add('dropdown', () => ({
|
||||
components: { AvatarMenu },
|
||||
store: helpers.store,
|
||||
template: '<avatar-menu placement="top" />',
|
||||
}))
|
||||
@ -132,6 +132,7 @@
|
||||
"prettier": "~1.18.2",
|
||||
"sass-loader": "~8.0.0",
|
||||
"storybook-design-token": "^0.4.1",
|
||||
"storybook-vue-router": "^1.0.7",
|
||||
"style-loader": "~0.23.1",
|
||||
"style-resources-loader": "~1.2.1",
|
||||
"vue-jest": "~3.0.5",
|
||||
|
||||
@ -33,10 +33,13 @@ const helpers = {
|
||||
namespaced: true,
|
||||
getters: {
|
||||
isModerator() {
|
||||
return false
|
||||
return true
|
||||
},
|
||||
isAdmin() {
|
||||
return true
|
||||
},
|
||||
user(state) {
|
||||
return { id: '1', name: 'admin' }
|
||||
return { id: '1', name: 'admin', slug: 'admin' }
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -15104,6 +15104,11 @@ storybook-design-token@^0.4.1:
|
||||
raw-loader "3.1.0"
|
||||
react-use-clipboard "0.1.4"
|
||||
|
||||
storybook-vue-router@^1.0.7:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/storybook-vue-router/-/storybook-vue-router-1.0.7.tgz#366451212149d9d0a32557545b244667bb01768e"
|
||||
integrity sha512-R+DYARQ40YVbMbV5moLDmQvodJX5FQPVy5cULb782P1gD5rAkulWtgt8yrM7pmjYru+LTPdLS4blrFPnWlb0sQ==
|
||||
|
||||
stream-browserify@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user