mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Add story for Empty component
Co-authored-by: @alina-beck
This commit is contained in:
parent
a1af4f5037
commit
3ae71544d6
24
webapp/components/Empty/Empty.story.js
Normal file
24
webapp/components/Empty/Empty.story.js
Normal file
@ -0,0 +1,24 @@
|
||||
import { storiesOf } from '@storybook/vue'
|
||||
import { withA11y } from '@storybook/addon-a11y'
|
||||
import HcEmpty from '~/components/Empty/Empty'
|
||||
import helpers from '~/storybook/helpers'
|
||||
|
||||
helpers.init()
|
||||
|
||||
storiesOf('Empty', module)
|
||||
.addDecorator(withA11y)
|
||||
.addDecorator(helpers.layout)
|
||||
.add(
|
||||
'tasks icon with message',
|
||||
() => ({
|
||||
components: { HcEmpty },
|
||||
template: '<hc-empty icon="tasks" message="Sorry, there are no ... available." />',
|
||||
}),
|
||||
{
|
||||
notes: "Possible icons include 'messages', 'events', 'alert', 'tasks', 'docs', and 'file'",
|
||||
},
|
||||
)
|
||||
.add('default icon, no message', () => ({
|
||||
components: { HcEmpty },
|
||||
template: '<hc-empty />',
|
||||
}))
|
||||
@ -26,7 +26,7 @@ export default {
|
||||
*/
|
||||
icon: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: 'alert',
|
||||
validator: value => {
|
||||
return value.match(/(messages|events|alert|tasks|docs|file)/)
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user