diff --git a/.changeset/dialog-hero-header.md b/.changeset/dialog-hero-header.md new file mode 100644 index 0000000000000..8bd09e6af46d4 --- /dev/null +++ b/.changeset/dialog-hero-header.md @@ -0,0 +1,6 @@ +--- +'@astryxdesign/core': patch +--- + +[feat] DialogHeroHeader: prominent, hero-style header for Dialog — the high-emphasis sibling of DialogHeader. Adds an optional media/visual slot and eyebrow above a display-scale title, centered by default (`align="start"` for left alignment), with the same onOpenChange-driven close button and aria-labelledby title behavior. For featured, marketing, or onboarding dialogs. +@Lee-Dongwook diff --git a/apps/storybook/stories/DialogHeroHeader.stories.tsx b/apps/storybook/stories/DialogHeroHeader.stories.tsx new file mode 100644 index 0000000000000..1fadd96442609 --- /dev/null +++ b/apps/storybook/stories/DialogHeroHeader.stories.tsx @@ -0,0 +1,162 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. + +import {useState} from 'react'; +import type {Meta, StoryObj} from '@storybook/react'; +import {Dialog, DialogHeroHeader} from '@astryxdesign/core/Dialog'; +import { + Layout, + LayoutContent, + LayoutFooter, + HStack, +} from '@astryxdesign/core/Layout'; +import {Button} from '@astryxdesign/core/Button'; +import {Icon} from '@astryxdesign/core/Icon'; +import {Text} from '@astryxdesign/core/Text'; + +const meta: Meta = { + title: 'Core/DialogHeroHeader', + component: DialogHeroHeader, + tags: ['autodocs'], + argTypes: { + align: { + control: 'inline-radio', + options: ['center', 'start'], + description: 'Horizontal alignment of the hero content', + }, + hasDivider: { + control: 'boolean', + description: 'Adds a border at the bottom edge', + }, + }, +}; + +export default meta; +type Story = StoryObj; + +/** + * The prominent hero treatment: media, eyebrow, display-scale title, and + * supporting text, centered by default. Actions live in LayoutFooter. + */ +function CenteredExample() { + const [isOpen, setIsOpen] = useState(false); + + return ( + <> +