promise-portal 1.0.2 → 1.0.3

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/README.md +14 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -155,6 +155,20 @@ const onClick = async () => {
155
155
  const output = await portal() // only allow empty parameter
156
156
  ```
157
157
 
158
+ you can set a config to definePortal
159
+
160
+ ```ts
161
+ definePortal(Comp, {
162
+ // set a time gap before portal unmount,
163
+ // in general, it to wait for animation effect
164
+ unmountDelay: 1000,
165
+ // set promise-portal instance explicitly to render this portal
166
+ // not use the active instance internally
167
+ // of course, you can use `setActiveInstance` to set active instance
168
+ instance: promisePortalInstance,
169
+ })
170
+ ```
171
+
158
172
  ## Link
159
173
 
160
174
  [@filez/portal](https://github.com/lenovo-filez/portal)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promise-portal",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "a vite plugin to load svg icon for element-plus",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",