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
This commit is contained in:
kame
2023-11-07 12:35:05 +09:00
committed by GitHub
parent b08511b9d1
commit 4f078e1ee4
44 changed files with 975 additions and 789 deletions

View File

@@ -1,6 +1,5 @@
/* eslint-disable no-alert */
import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import { NotifyReminderPopup } from './NotifyReminderPopup';
import Mock from '../../../stories/assets/mocks/notify-popup.png';
@@ -12,7 +11,7 @@ const Example = args => (
</div>
);
export default {
const meta = {
title: 'owncast/Components/Notify Reminder',
component: NotifyReminderPopup,
parameters: {
@@ -27,22 +26,30 @@ Clicking it will make the notification modal display. Clicking the "X" will hide
},
},
},
} as ComponentMeta<typeof NotifyReminderPopup>;
} satisfies Meta<typeof NotifyReminderPopup>;
const Template: ComponentStory<typeof NotifyReminderPopup> = args => <Example {...args} />;
export default meta;
export const Active = Template.bind({});
Active.args = {
open: true,
notificationClicked: () => {
alert('notification clicked');
},
notificationClosed: () => {
alert('notification closed');
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 = Template.bind({});
InActive.args = {
open: false,
export const InActive = {
render: Template,
args: {
open: false,
},
};