Skip to content

Commit e06f75e

Browse files
committed
update story
1 parent 46daafd commit e06f75e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/storybook/stories/dismissable-layer.stories.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,14 @@ type DummyDialogProps = {
484484

485485
function DummyDialog({ children, openLabel = 'Open', closeLabel = 'Close' }: DummyDialogProps) {
486486
const [open, setOpen] = React.useState(false);
487+
const buttonRef = React.useRef<HTMLButtonElement>(null);
487488
return (
488489
<>
489-
<button type="button" onClick={() => setOpen((prevOpen) => !prevOpen)}>
490+
<button type="button" ref={buttonRef} onClick={() => setOpen((prevOpen) => !prevOpen)}>
490491
{openLabel}
491492
</button>
492493
{open ? (
493-
<FocusGuards.Root>
494+
<FocusGuards.Root domRef={buttonRef}>
494495
<Portal.Root asChild>
495496
<div
496497
style={{

0 commit comments

Comments
 (0)