55/**
66 * @file DialogHeroHeaderShowcase.tsx
77 * @input DialogHeroHeader composed with Dialog and Layout
8- * @output A dismissible onboarding preview with full-bleed decorative media
8+ * @output A static onboarding preview with full-bleed decorative media
99 * @position Canary Lab showcase shared by CLI discovery, docsite, and Storybook
1010 */
1111
12- import { useId , useState } from 'react' ;
12+ import { useId } from 'react' ;
1313import * as stylex from '@stylexjs/stylex' ;
1414import { DialogHeroHeader } from '@astryxdesign/lab' ;
1515import { Button } from '@astryxdesign/core/Button' ;
@@ -23,12 +23,13 @@ const styles = stylex.create({
2323 } ,
2424} ) ;
2525
26+ // The preview stays open: closing would unmount the focused control and drop
27+ // keyboard focus to the page.
2628export default function DialogHeroHeaderShowcase ( ) {
27- const [ isOpen , setIsOpen ] = useState ( true ) ;
2829 const gradientId = useId ( ) ;
2930
30- return isOpen ? (
31- < Dialog isOpen isInline onOpenChange = { setIsOpen } >
31+ return (
32+ < Dialog isOpen isInline onOpenChange = { ( ) => { } } >
3233 < Layout
3334 header = {
3435 < DialogHeroHeader
@@ -54,7 +55,7 @@ export default function DialogHeroHeaderShowcase() {
5455 </ svg >
5556 }
5657 mediaMode = "dark"
57- onOpenChange = { setIsOpen }
58+ onOpenChange = { ( ) => { } }
5859 />
5960 }
6061 content = {
@@ -67,20 +68,10 @@ export default function DialogHeroHeaderShowcase() {
6768 }
6869 footer = {
6970 < LayoutFooter >
70- < Button
71- label = "Get started"
72- variant = "primary"
73- onClick = { ( ) => setIsOpen ( false ) }
74- />
71+ < Button label = "Get started" variant = "primary" />
7572 </ LayoutFooter >
7673 }
7774 />
7875 </ Dialog >
79- ) : (
80- < Button
81- label = "Preview welcome dialog"
82- variant = "secondary"
83- onClick = { ( ) => setIsOpen ( true ) }
84- />
8576 ) ;
8677}
0 commit comments