import { Meta, StoryObj } from "@storybook/react" import { list } from "radash" import React, { useState } from "react" import { Button } from "../Button" import { RadioButtonGroup } from "../RadioButtonGroup" import { Switch } from "../Switch" import { Modal } from "./Modal" type Story = StoryObj const meta: Meta = { title: "Design System/Modal", component: Modal, args: { content: ( <> Title content Body content ), children: , }, } export default meta export const Uncontrolled: Story = {} export const Controlled: Story = { render: function Render() { const [isOpen, setIsOpen] = useState(false) return ( <> ) }, } export const InitiallyOpen: Story = { args: { open: true, children: null, }, } export const NoCloseIcon: Story = { args: { withCloseIcon: false, }, } export const WithFooter: Story = { args: { content: ( <> Title content Body content Buy now ), }, } export const WithChangingHeight: Story = { render: function Render() { const [lines, setLines] = useState(1) return ( <> Title content {list(1, lines).map(i => { return

Body content

})}
{ setLines(lines + 3) }} > Add lines setLines(lines - 3)}> Remove lines } open /> ) }, } export const OnlyBody: Story = { args: { content: (
Hello!
Hi world!
Hello world!
), }, } export const WithHeroMedia: Story = { args: { content: ( <>
A new OpenSea that caters to you
Collector The simple way to discover, buy, and sell NFTs. Advanced Advanced tools and analytics for NFT pros. Continue ), }, }