2022-05-17 05:06:48 +02:00
|
|
|
/* eslint-disable no-alert */
|
2022-05-13 05:52:19 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
2022-09-07 09:00:28 +02:00
|
|
|
import { NotifyReminderPopup } from './NotifyReminderPopup';
|
2022-09-03 20:38:52 +02:00
|
|
|
import Mock from '../../../stories/assets/mocks/notify-popup.png';
|
2022-05-13 05:52:19 +02:00
|
|
|
|
2022-05-17 05:06:48 +02:00
|
|
|
const Example = args => (
|
|
|
|
<div style={{ margin: '20px', marginTop: '130px' }}>
|
2022-09-03 20:38:52 +02:00
|
|
|
<NotifyReminderPopup {...args}>
|
2022-05-17 05:06:48 +02:00
|
|
|
<button type="button">notify button</button>
|
2022-09-03 20:38:52 +02:00
|
|
|
</NotifyReminderPopup>
|
2022-05-17 05:06:48 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
2022-05-13 05:52:19 +02:00
|
|
|
export default {
|
2022-05-17 23:24:48 +02:00
|
|
|
title: 'owncast/Components/Notify Reminder',
|
2022-09-03 20:38:52 +02:00
|
|
|
component: NotifyReminderPopup,
|
2022-05-13 05:52:19 +02:00
|
|
|
parameters: {
|
|
|
|
design: {
|
|
|
|
type: 'image',
|
|
|
|
url: Mock,
|
|
|
|
},
|
|
|
|
docs: {
|
|
|
|
description: {
|
|
|
|
component: `After visiting the page three times this popup reminding you that you can register for live stream notifications shows up.
|
2022-05-17 05:06:48 +02:00
|
|
|
Clicking it will make the notification modal display. Clicking the "X" will hide the modal and make it never show again.`,
|
2022-05-13 05:52:19 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-09-03 20:38:52 +02:00
|
|
|
} as ComponentMeta<typeof NotifyReminderPopup>;
|
2022-05-13 05:52:19 +02:00
|
|
|
|
2022-09-03 20:38:52 +02:00
|
|
|
const Template: ComponentStory<typeof NotifyReminderPopup> = args => <Example {...args} />;
|
2022-05-17 05:06:48 +02:00
|
|
|
|
|
|
|
export const Active = Template.bind({});
|
|
|
|
Active.args = {
|
2022-12-12 19:30:13 +01:00
|
|
|
open: true,
|
2022-05-17 05:06:48 +02:00
|
|
|
notificationClicked: () => {
|
|
|
|
alert('notification clicked');
|
|
|
|
},
|
|
|
|
notificationClosed: () => {
|
|
|
|
alert('notification closed');
|
|
|
|
},
|
|
|
|
};
|
2022-05-13 05:52:19 +02:00
|
|
|
|
2022-05-17 05:06:48 +02:00
|
|
|
export const InActive = Template.bind({});
|
|
|
|
InActive.args = {
|
2022-12-12 19:30:13 +01:00
|
|
|
open: false,
|
2022-05-17 05:06:48 +02:00
|
|
|
};
|