From 65ac78acec33af42b962a2be1798ac033f751ece Mon Sep 17 00:00:00 2001
From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Date: Wed, 3 Aug 2022 20:49:42 +0530
Subject: [PATCH] feat: Add a popup component for announcements (#4615)
---
.../components/ui/AnnouncementPopup.vue | 88 +++++++++++++++++++
.../ui/stories/AnnouncementPopup.stories.js | 46 ++++++++++
2 files changed, 134 insertions(+)
create mode 100644 app/javascript/dashboard/components/ui/AnnouncementPopup.vue
create mode 100644 app/javascript/dashboard/components/ui/stories/AnnouncementPopup.stories.js
diff --git a/app/javascript/dashboard/components/ui/AnnouncementPopup.vue b/app/javascript/dashboard/components/ui/AnnouncementPopup.vue
new file mode 100644
index 000000000..ad59bc8ac
--- /dev/null
+++ b/app/javascript/dashboard/components/ui/AnnouncementPopup.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/components/ui/stories/AnnouncementPopup.stories.js b/app/javascript/dashboard/components/ui/stories/AnnouncementPopup.stories.js
new file mode 100644
index 000000000..3166eff05
--- /dev/null
+++ b/app/javascript/dashboard/components/ui/stories/AnnouncementPopup.stories.js
@@ -0,0 +1,46 @@
+import { action } from '@storybook/addon-actions';
+import WootAnnouncementPopup from '../AnnouncementPopup.vue';
+
+export default {
+ title: 'Components/Popup/Announcement Popup',
+ argTypes: {
+ popupMessage: {
+ defaultValue:
+ 'Now a new key shortcut (⌘ + ↵) is available to send messages. You can enable it in the',
+ control: {
+ type: 'text',
+ },
+ },
+ routeText: {
+ defaultValue: 'profile settings',
+ control: {
+ type: 'text',
+ },
+ },
+ hasCloseButton: {
+ defaultValue: true,
+ control: {
+ type: 'boolean',
+ },
+ },
+ closeButtonText: {
+ defaultValue: 'Got it',
+ control: {
+ type: 'text',
+ },
+ },
+ },
+};
+
+const Template = (args, { argTypes }) => ({
+ props: Object.keys(argTypes),
+ components: { WootAnnouncementPopup },
+ template:
+ '',
+});
+
+export const AnnouncementPopup = Template.bind({});
+AnnouncementPopup.args = {
+ onClickOpenPath: action('opened path'),
+ onClickClose: action('closed the popup'),
+};