mirror of
https://github.com/owncast/owncast.git
synced 2024-11-26 23:24:29 +03:00
4f078e1ee4
* 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
41 lines
903 B
TypeScript
41 lines
903 B
TypeScript
import { StoryFn, Meta } from '@storybook/react';
|
|
import { Modal } from './Modal';
|
|
|
|
const meta = {
|
|
title: 'owncast/Modals/Container',
|
|
component: Modal,
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
component: `This is the popup modal container that all modal content is rendered inside. It can be passed content nodes to render, or a URL to show an iframe.`,
|
|
},
|
|
},
|
|
},
|
|
} satisfies Meta<typeof Modal>;
|
|
|
|
export default meta;
|
|
|
|
const Template: StoryFn<typeof Modal> = args => {
|
|
const { children } = args;
|
|
return <Modal {...args}>{children}</Modal>;
|
|
};
|
|
|
|
export const Example = {
|
|
render: Template,
|
|
|
|
args: {
|
|
title: 'Modal example with content nodes',
|
|
visible: true,
|
|
children: <div>Test 123</div>,
|
|
},
|
|
};
|
|
|
|
export const UrlExample = {
|
|
render: Template,
|
|
|
|
args: {
|
|
title: 'Modal example with URL',
|
|
visible: true,
|
|
url: 'https://owncast.online',
|
|
},
|
|
};
|