From 542647f4186780595a0d831158f20144526a8727 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Wed, 30 Oct 2019 14:40:02 +0100 Subject: [PATCH] Add NotificationsDropdownFilter story, refactor - rename incorrectly named varaibles - use filterOptions to remove unneccessary computed routes Co-authored-by: @alina-beck --- .../NotificationsDropdownFilter.story.js | 18 ++++++++++ .../NotificationsDropdownFilter.vue | 33 +++++++------------ webapp/locales/de.json | 2 +- webapp/locales/en.json | 2 +- webapp/locales/pt.json | 2 +- webapp/pages/notifications/index.vue | 6 ++-- 6 files changed, 35 insertions(+), 28 deletions(-) create mode 100644 webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.story.js diff --git a/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.story.js b/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.story.js new file mode 100644 index 000000000..35724fe7e --- /dev/null +++ b/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.story.js @@ -0,0 +1,18 @@ +import { storiesOf } from '@storybook/vue' +import { withA11y } from '@storybook/addon-a11y' +import { action } from '@storybook/addon-actions' +import NotificationsDropdownFilter from '~/components/NotificationsDropdownFilter/NotificationsDropdownFilter' +import helpers from '~/storybook/helpers' + +helpers.init() + +storiesOf('NotificationsDropdownFilter', module) + .addDecorator(withA11y) + .addDecorator(helpers.layout) + .add('filter dropdown', () => ({ + components: { NotificationsDropdownFilter }, + methods: { + filterNotifications: action('filterNotifications'), + }, + template: '', + })) diff --git a/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.vue b/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.vue index b0d1deb7d..7c5e0a42a 100644 --- a/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.vue +++ b/webapp/components/NotificationsDropdownFilter/NotificationsDropdownFilter.vue @@ -1,5 +1,5 @@