Skip to content

Commit

Permalink
docs: upgrade modal migration wording (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil authored Aug 31, 2023
1 parent c41003d commit be6b6f3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/pages/upgrade.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ We renamed some icons:

- We have adjusted colors and spacing.
- **Modal.Title** is now named **Modal.Header** and has props `title` (mandatory) and `subtitle` (optional).
- **Modal.Content** is replaced by **Modal.Body**.
- To ensure **good spacing** between modal's sub-components, they **must** be wrapped with **Modal.Content**.
- **Modal.Body** is now the content box for Modal.
- **Modal.Cover** has been removed.
- We migrated to Ariakit and added an `useModal` hook to play with the component store.
- `onClose` has been changed from an optional prop of **Modal** to an optional option you can pass to useModal
Expand All @@ -294,7 +294,15 @@ We renamed some icons:
+ const modal = useModal()

- <Modal {...modalState}>
- <Modal.Content>
...
- </Modal.Content>
+ <Modal store={modal}>
+ <Modal.Content store={modal}>
+ <Modal.Body>
...
+ </Modal.Body>
+ </Modal.Content>
= ...
= </Modal>
```
Expand Down

0 comments on commit be6b6f3

Please sign in to comment.