Skip to content

Commit

Permalink
fix(docs): add more information on converting from Modal (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinarosv authored Feb 23, 2022
1 parent a2ea11c commit 1cce729
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ To provide custom content to parts of the Dialog, a set of component parts are p
### More detailed information

For more details regarding the component functionality, check out the [Modal documentation](/uilib/components/modal).

#### Converting from Modal

If you are converting from `<Modal />` to `<Dialog />`, there are a few differences you need to take into consideration:

- All `trigger_*` props are not supported for Dialog, use `triggerAttributes` instead to pass in props for the trigger button.
- Only camelCase props are supported for Dialog, so you will need to update the prop names.
- `Modal.Inner`/`Modal.Content` converts to `Dialog.Body`.
- `Modal.Bar` converts to `Dialog.Navigaton`.
- `Modal` was a class component and `Dialog` is a functional component.
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ To provide custom content to parts of the Drawer, a set of component parts are p
### More detailed information

For more details regarding the component functionality, check out the [Modal documentation](/uilib/components/modal).

#### Converting from Modal mode drawer

If you are converting from `<Modal mode="drawer" />` to `<Drawer />`, there are a few differences you need to take into consideration:

- All `trigger_*` props are not supported for Drawer, use `triggerAttributes` instead to pass in props for the trigger button.
- Only camelCase props are supported for Drawer, so you will need to update the prop names.
- `Modal.Inner`/`Modal.Content` converts to `Drawer.Body`.
- `Modal.Bar` converts to `Drawer.Navigaton`.
- `Modal` was a class component and `Drawer` is a functional component.

0 comments on commit 1cce729

Please sign in to comment.