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