2023-11-07 12:35:05 +09:00
import { StoryFn , Meta } from '@storybook/react' ;
2022-09-07 09:00:28 +02:00
import { Modal } from './Modal' ;
2022-04-17 18:50:39 -07:00
2023-11-07 12:35:05 +09:00
const meta = {
2022-05-12 17:59:40 -07:00
title : 'owncast/Modals/Container' ,
2022-04-17 18:50:39 -07:00
component : Modal ,
2022-05-12 20:52:19 -07: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. ` ,
} ,
} ,
} ,
2023-11-07 12:35:05 +09:00
} satisfies Meta < typeof Modal > ;
2022-04-17 18:50:39 -07:00
2023-11-07 12:35:05 +09:00
export default meta ;
const Template : StoryFn < typeof Modal > = args = > {
2022-05-09 15:34:02 -07:00
const { children } = args ;
return < Modal { ...args } > { children } < / Modal > ;
} ;
2022-04-17 18:50:39 -07:00
2023-11-07 12:35:05 +09:00
export const Example = {
render : Template ,
args : {
title : 'Modal example with content nodes' ,
visible : true ,
children : < div > Test 123 < / div > ,
} ,
2022-05-09 15:34:02 -07:00
} ;
2023-11-07 12:35:05 +09:00
export const UrlExample = {
render : Template ,
args : {
title : 'Modal example with URL' ,
visible : true ,
url : 'https://owncast.online' ,
} ,
2022-05-09 15:34:02 -07:00
} ;