0
owncast/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.stories.tsx
kame 4f078e1ee4
Migrated Storybook notation from CSF2 to CSF3 (#3412)
* Migrate web action-buttons directory to CSF3 notation

* Migrate web chat directory to CSF3 notation

* Migrate web common directory to CSF3 notation

* Migrate web layout directory to CSF3 notation

* Migrate web modals directory to CSF3 notation

* Migrate web ui directory to CSF3 notation

* Migrate web video directory to CSF3 notation

* Migrate web stories directory to CSF3 notation
2023-11-06 19:35:05 -08:00

56 lines
1.3 KiB
TypeScript

/* eslint-disable no-alert */
import { StoryFn, Meta } from '@storybook/react';
import { NotifyReminderPopup } from './NotifyReminderPopup';
import Mock from '../../../stories/assets/mocks/notify-popup.png';
const Example = args => (
<div style={{ margin: '20px', marginTop: '130px' }}>
<NotifyReminderPopup {...args}>
<button type="button">notify button</button>
</NotifyReminderPopup>
</div>
);
const meta = {
title: 'owncast/Components/Notify Reminder',
component: NotifyReminderPopup,
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.
Clicking it will make the notification modal display. Clicking the "X" will hide the modal and make it never show again.`,
},
},
},
} satisfies Meta<typeof NotifyReminderPopup>;
export default meta;
const Template: StoryFn<typeof NotifyReminderPopup> = args => <Example {...args} />;
export const Active = {
render: Template,
args: {
open: true,
notificationClicked: () => {
alert('notification clicked');
},
notificationClosed: () => {
alert('notification closed');
},
},
};
export const InActive = {
render: Template,
args: {
open: false,
},
};