Skip to content

Commit

Permalink
Update Docs for Popover (#2182)
Browse files Browse the repository at this point in the history
* Update popover.mdx

* Update showcase.tsx
  • Loading branch information
sbennett33 authored Jan 20, 2025
1 parent 1487224 commit 6bc21ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions website/components/showcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ const components = {
modal: false,
portalled: false,
autoFocus: true,
closeOnBlur: true,
closeOnEsc: true,
closeOnInteractOutside: true,
closeOnEscape: true,
}}
/>
),
Expand Down
8 changes: 4 additions & 4 deletions website/data/components/popover.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ const [state, send] = useMachine(
The popover is designed to close on blur and when the `esc` key is pressed.

To prevent it from closing on blur (clicking or focusing outside), pass the
`closeOnBlur` property and set it to `false`.
`closeOnInteractOutside` property and set it to `false`.

```jsx {3}
const [state, send] = useMachine(
popover.machine({
closeOnBlur: true,
closeOnInteractOutside: true,
}),
)
```

To prevent it from closing when the `esc` key is pressed, pass the `closeOnEsc`
To prevent it from closing when the `esc` key is pressed, pass the `closeOnEscape`
property and set it to `false`.

```jsx {3}
const [state, send] = useMachine(
popover.machine({
closeOnEsc: true,
closeOnEscape: true,
}),
)
```
Expand Down

0 comments on commit 6bc21ec

Please sign in to comment.