-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE(web-react): Remove old Modal and rename ModalComposed…
… to Modal #DS-617 ## Migration Guide 1. **Discontinue the old `Modal` component:** The old `Modal` component has been entirely removed and is no longer available for use. 2. **Adopt the new `Modal` in place of `ModalComposed`:** The `ModalComposed` component has been renamed to `Modal`. Thus, replace all instances of `ModalComposed` in your codebase with `Modal`. 3. **Update Component Tags:** Make sure to modify the component tags in your codebase as outlined below: - `<ModalComposed …>` → `<Modal …>` - `<ModalComposedBody …>` → `<ModalBody …>` - `<ModalComposedDialog …>` → `<ModalDialog …>` - `<ModalComposedFooter …>` → `<ModalFooter …>` - `<ModalComposedHeader …>` → `<ModalHeader …>` Please refer back to this guide or reach out to our team if you encounter any issues during migration.
- Loading branch information
1 parent
44a9fd7
commit f323e9b
Showing
47 changed files
with
461 additions
and
936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { createContext, useContext } from 'react'; | ||
import { ModalDialogHandlingProps } from '../../types'; | ||
|
||
export type ModalContextProps = { | ||
id: string; | ||
} & ModalDialogHandlingProps; | ||
|
||
const defaultContext: ModalContextProps = { | ||
id: '', | ||
isOpen: false, | ||
onClose: () => null, | ||
}; | ||
|
||
const ModalContext = createContext<ModalContextProps>(defaultContext); | ||
const ModalProvider = ModalContext.Provider; | ||
const ModalConsumer = ModalContext.Consumer; | ||
const useModalContext = (): ModalContextProps => useContext(ModalContext); | ||
|
||
export default ModalContext; | ||
export { ModalProvider, ModalConsumer, useModalContext }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.