mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 13:50:06 +03:00
34 lines
939 B
TypeScript
34 lines
939 B
TypeScript
import React from 'react';
|
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
import Modal from '../components/ui/Modal/Modal';
|
|
|
|
export default {
|
|
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.`,
|
|
},
|
|
},
|
|
},
|
|
} as ComponentMeta<typeof Modal>;
|
|
|
|
const Template: ComponentStory<typeof Modal> = args => {
|
|
const { children } = args;
|
|
return <Modal {...args}>{children}</Modal>;
|
|
};
|
|
|
|
export const Example = Template.bind({});
|
|
Example.args = {
|
|
title: 'Modal example with content nodes',
|
|
visible: true,
|
|
children: <div>Test 123</div>,
|
|
};
|
|
|
|
export const UrlExample = Template.bind({});
|
|
UrlExample.args = {
|
|
title: 'Modal example with URL',
|
|
visible: true,
|
|
url: 'https://owncast.online',
|
|
};
|