mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix DropdownFilter story after refactor
- it was refactored to make reuse easier
This commit is contained in:
parent
d56c81dc3d
commit
49f73976b7
@ -5,14 +5,26 @@ import DropdownFilter from '~/components/DropdownFilter/DropdownFilter'
|
||||
import helpers from '~/storybook/helpers'
|
||||
|
||||
helpers.init()
|
||||
|
||||
const filterOptions = [
|
||||
{ label: 'All', value: null },
|
||||
{ label: 'Read', value: true },
|
||||
{ label: 'Unread', value: false },
|
||||
]
|
||||
storiesOf('DropdownFilter', module)
|
||||
.addDecorator(withA11y)
|
||||
.addDecorator(helpers.layout)
|
||||
.add('filter dropdown', () => ({
|
||||
components: { DropdownFilter },
|
||||
data: () => ({
|
||||
filterOptions,
|
||||
selected: filterOptions[0].label,
|
||||
}),
|
||||
methods: {
|
||||
filterNotifications: action('filterNotifications'),
|
||||
},
|
||||
template: '<notifications-dropdown-filter @filterNotifications="filterNotifications" />',
|
||||
template: `<dropdown-filter
|
||||
@filterNotifications="filterNotifications"
|
||||
:filterOptions="filterOptions"
|
||||
:selected="selected"
|
||||
/>`,
|
||||
}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user