Skip to content

Commit

Permalink
🛠 Reactor: Rename to RNIModalViewModule
Browse files Browse the repository at this point in the history
Summary: Rename `ModalViewModule` to `RNIModalViewModule`.
  • Loading branch information
dominicstop committed Jan 6, 2023
1 parent 006a935 commit 451795d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Right usage:
#### 3.1.2 Props: Strings
| Name/Type | Default | Description |
|--------------------------------------------------------------|--------------------------------------------------------------|--------------------------------------------------------------|
| **modalID**: `string` | **Default**: `null` | Assign a unique ID to the modal. You can use the ID to refer to this modal when using the `ModalViewModule` functions and programatically control it. |
| **modalID**: `string` | **Default**: `null` | Assign a unique ID to the modal. You can use the ID to refer to this modal when using the `RNIModalViewModule` functions and programatically control it. |
| **modalTransitionStyle**: `UIModalTransitionStyles` value | **Default**: `coverVertical` | The transition style to use when presenting/dismissing a modal. If an invalid/unsupported value is passed, the default or the last supported value will be used. |
| **modalPresentationStyle**: `UIModalPresentationStyles` value | **Default**: `automatic` when on iOS 13+, otherwise `overFullScreen` | The presentation style to use when presenting/dismissing a modal. If an invalid/unsupported value is passed, the default or the last supported value will be used. |
| **modalBGBlurEffectStyle**: `UIBlurEffectStyles` value | **Default**: `systemThinMaterial` when on iOS 13+, otherwise `light` | The blur style to use for the `UIBlurEffect` modal background. If an invalid/unsupported value is passed, the default or the last supported value will be used. |
Expand Down Expand Up @@ -146,10 +146,10 @@ Right usage:
| **async** `setIsModalInPresentation(bool)` | When `setModalInPresentationFromProps` prop is true, it allows you to programatically set `isModalInPresentation` via function. |
<br/>

### 3.2 `ModalViewModule`
### 3.2 `RNIModalViewModule`
A `NativeModule` that's a collection of functions to programmatically control a `ModalView`
* Import the module: `import { ModalViewModule } from 'react-native-ios-modal'`
* Example Usage: `ModalViewModule.dismissAllModals(true)`
* Import the module: `import { RNIModalViewModule } from 'react-native-ios-modal'`
* Example Usage: `RNIModalViewModule.dismissAllModals(true)`

<br/>

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export * from './context/ModalContext';
export * from './hoc/withModalLifecycle';

export * from './native_components/RNIModalView';
export * from './native_modules/ModalViewModule';
export * from './native_modules/RNIModalViewModule';

export * from './types/UIModalTypes';
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const COMMAND_KEYS = {
// wip
const ModalViewFocusEvents = new NativeEventEmitter(NativeModule);

export class ModalViewModule {
export class RNIModalViewModule {
static dismissModalByID(modalID = ''){
const promise = new Promise((resolve, reject) => {
try {
Expand All @@ -21,7 +21,7 @@ export class ModalViewModule {
});

} catch(error){
console.log("ModalViewModule, dismissModalByID error:");
console.log("RNIModalViewModule, dismissModalByID error:");
console.log(error);
reject(error);
};
Expand All @@ -38,7 +38,7 @@ export class ModalViewModule {
});

} catch(error){
console.log("ModalViewModule, dismissAllModals error:");
console.log("RNIModalViewModule, dismissAllModals error:");
console.log(error);
reject();
};
Expand Down

0 comments on commit 451795d

Please sign in to comment.