2022-05-17 06:06:48 +03:00
|
|
|
/* eslint-disable no-alert */
|
2023-11-07 06:35:05 +03:00
|
|
|
import { StoryFn, Meta } from '@storybook/react';
|
2022-09-07 10:00:28 +03:00
|
|
|
import { NotifyReminderPopup } from './NotifyReminderPopup';
|
2022-09-03 21:38:52 +03:00
|
|
|
import Mock from '../../../stories/assets/mocks/notify-popup.png';
|
2022-05-13 06:52:19 +03:00
|
|
|
|
2022-05-17 06:06:48 +03:00
|
|
|
const Example = args => (
|
|
|
|
<div style={{ margin: '20px', marginTop: '130px' }}>
|
2022-09-03 21:38:52 +03:00
|
|
|
<NotifyReminderPopup {...args}>
|
2022-05-17 06:06:48 +03:00
|
|
|
<button type="button">notify button</button>
|
2022-09-03 21:38:52 +03:00
|
|
|
</NotifyReminderPopup>
|
2022-05-17 06:06:48 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
const meta = {
|
2022-05-18 00:24:48 +03:00
|
|
|
title: 'owncast/Components/Notify Reminder',
|
2022-09-03 21:38:52 +03:00
|
|
|
component: NotifyReminderPopup,
|
2022-05-13 06:52:19 +03: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 06:06:48 +03: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 06:52:19 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-11-07 06:35:05 +03:00
|
|
|
} satisfies Meta<typeof NotifyReminderPopup>;
|
2022-05-13 06:52:19 +03:00
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
export default meta;
|
2022-05-17 06:06:48 +03:00
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
const Template: StoryFn<typeof NotifyReminderPopup> = args => <Example {...args} />;
|
|
|
|
|
|
|
|
export const Active = {
|
|
|
|
render: Template,
|
|
|
|
|
|
|
|
args: {
|
|
|
|
open: true,
|
|
|
|
notificationClicked: () => {
|
|
|
|
alert('notification clicked');
|
|
|
|
},
|
|
|
|
notificationClosed: () => {
|
|
|
|
alert('notification closed');
|
|
|
|
},
|
2022-05-17 06:06:48 +03:00
|
|
|
},
|
|
|
|
};
|
2022-05-13 06:52:19 +03:00
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
export const InActive = {
|
|
|
|
render: Template,
|
|
|
|
|
|
|
|
args: {
|
|
|
|
open: false,
|
|
|
|
},
|
2022-05-17 06:06:48 +03:00
|
|
|
};
|