owncast/web/stories/Modal.stories.tsx

29 lines
732 B
TypeScript
Raw Normal View History

2022-04-18 03:50:39 +02:00
import React, { useState } from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
2022-05-10 00:34:02 +02:00
import Modal from '../components/ui/Modal/Modal';
2022-04-18 03:50:39 +02:00
export default {
2022-05-13 02:59:40 +02:00
title: 'owncast/Modals/Container',
2022-04-18 03:50:39 +02:00
component: Modal,
parameters: {},
} as ComponentMeta<typeof Modal>;
2022-05-10 00:34:02 +02:00
const Template: ComponentStory<typeof Modal> = args => {
const { children } = args;
return <Modal {...args}>{children}</Modal>;
};
2022-04-18 03:50:39 +02:00
export const Example = Template.bind({});
2022-05-10 00:34:02 +02:00
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',
};