react-modal-port 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-modal-port",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Launch modals from any React component.",
5
5
  "type": "module",
6
6
  "types": "./types/index.d.ts",
package/readme.md CHANGED
@@ -112,7 +112,7 @@ The `launchModal` function expects the following arguments:
112
112
  | Argument | Type | Description |
113
113
  |----------|------|-------------|
114
114
  | render | `React.FC` | A function that renders the modal and returns a `ReactNode`. |
115
- | resolvers | `{ [key: string]: (ev?: SyntheticEvent) => Promise<any>\|void }` | An object of resolver functions that will be passed as props to `render`. |
115
+ | resolvers | `{ [key: string]: (...args: any[]) => Promise<void>\|void }` | An object of resolver functions that will be passed as props to `render`. |
116
116
  | onBackdropClickUse | `string` | Optional: The key of the resolver function in the `resolvers` object that should be passed to the backdrop component’s `onBackdropClick` prop. |
117
117
 
118
118
  Modals can be created and designed to fully fit your needs. The only requirement is to define the functions to resolve them, for example, when clicking a button. The modal component for the example above could look like this: