import { Meta, StoryObj } from "@storybook/react" import React, { useState } from "react" import { MOONBIRDS_ITEM } from "../../constants/story" import { Button } from "../Button" import { FlexColumn } from "../FlexColumn" import { Modal } from "../Modal" import { SpaceBetween } from "../SpaceBetween" import { Text } from "../Text" import { TakeoverModal } from "./TakeoverModal" type Story = StoryObj const meta: Meta = { title: "Design System/TakeoverModal", component: TakeoverModal, parameters: { layout: "fullscreen", }, args: { content: ( <> Header Body content ), children: , }, } export default meta export const Uncontrolled: Story = {} export const OnlyFadeOut: Story = { args: { animation: "out", }, } export const Controlled: Story = { render: function Render() { const [isOpen, setIsOpen] = useState(false) return ( <> ) }, } export const InitiallyOpen: Story = { args: { open: true, children: null, }, } export const WithoutCloseIcon: Story = { args: { open: true, children: null, withCloseIcon: false, }, } export const Transparent: Story = { render: function Render() { const [isOpen, setIsOpen] = useState(false) return ( <> Adding this image so you can see the overlay transparency ) }, } // Render another modal within this modal export const NestedModal: Story = { args: { content: ( <> Header Nested modal title Nested modal body content } > ), }, } export const OverflowBody: Story = { args: { content: ( <> Header
Body content
End of body content
), }, }