diff --git a/packages/ui/src/v2/Dialog/Dialog.stories.tsx b/packages/ui/src/v2/Dialog/Dialog.stories.tsx new file mode 100644 index 000000000..2f615a365 --- /dev/null +++ b/packages/ui/src/v2/Dialog/Dialog.stories.tsx @@ -0,0 +1,106 @@ +// Copyright (c) 2026 Probo Inc . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +import { useState } from "react"; + +import { Button } from "../Button/Button"; +import { Text } from "../typography/Text"; + +import { Dialog } from "./Dialog"; +import { DialogBody } from "./DialogBody"; +import { DialogClose } from "./DialogClose"; +import { DialogDescription } from "./DialogDescription"; +import { DialogFooter } from "./DialogFooter"; +import { DialogHeader } from "./DialogHeader"; +import { DialogPopup } from "./DialogPopup"; +import { DialogSkeleton } from "./DialogSkeleton"; +import { DialogTitle } from "./DialogTitle"; +import { DialogTrigger } from "./DialogTrigger"; + +export default { + title: "v2/Dialog", + component: Dialog, +}; + +export function Default() { + return ( + + Open dialog} /> + + + Sign in to continue + + Access protected resources or submit a request. + + + + + Dialog body content lives here — a form, a message, or any other + slot the surrounding page composes. + + + + Cancel} /> + Confirm} /> + + + + ); +} + +export function Controlled() { + const [open, setOpen] = useState(false); + + return ( +
+ + {open ? "open" : "closed"} + + + + + Delete third party + + This action cannot be undone. + + + + + + + + +
+ ); +} + +export function Skeleton() { + return ( +
+ +
+ ); +}