import type { Meta, StoryObj } from "@storybook/react-vite"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
Button,
} from "@hm-design/ui"
import { STORY_KICKER, StoryPage, StoryPageHeader, StorySection } from "@/components/story-page"
// Alert Dialog is a modal Radix overlay (Portal) for a decision that must be confirmed or cancelled: no Close (X), no outside
// dismiss. The representative Story opens the real dialogs; the same cases start open in the verification Stories.
// Action / Cancel are the HM Button: ordinary confirmation uses a Solid pair; deletion uses an Outline pair.
function Confirmation({ defaultOpen }: { defaultOpen?: boolean }) {
return (
로그아웃하시겠습니까?저장하지 않은 변경 사항은 사라집니다.취소로그아웃
)
}
function Destructive({ defaultOpen }: { defaultOpen?: boolean }) {
return (
프로젝트를 삭제하시겠습니까?삭제하면 되돌릴 수 없습니다. 프로젝트의 모든 데이터가 함께 삭제됩니다.취소
삭제
)
}
const meta = { title: "Components/Overlay/Alert Dialog", component: AlertDialog, parameters: { layout: "centered" } } satisfies Meta
export default meta
type Story = StoryObj
// Representative Story: the common Story page; each trigger opens the real dialog.
export const All: Story = {
name: "Alert Dialog",
parameters: { layout: "fullscreen", controls: { disable: true } },
render: () => (
),
}
export const ConfirmationOpen: Story = { tags: ["verification"], name: "Confirmation", render: () => }
export const DestructiveOpen: Story = { tags: ["verification"], name: "Destructive", render: () => }