react-simple-dialogs
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "react-simple-dialogs", | ||
"private": false, | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Pedro Henrique Pires", | ||
@@ -74,3 +74,2 @@ "license": "MIT", | ||
"eslint-plugin-react-refresh": "^0.4.3", | ||
"framer-motion": "^10.13.0", | ||
"husky": "^8.0.3", | ||
@@ -77,0 +76,0 @@ "jsdom": "^22.1.0", |
@@ -55,3 +55,3 @@ <div align="center"> | ||
Use the dialogs is almost like use the dialogs native function (`alert`, `confirm` and `prompt`). | ||
Using the dialogs is almost like using the native dialogs function (`alert`, `confirm` and `prompt`). | ||
@@ -97,1 +97,21 @@ > All dialog function will return an `Promise` that only resolves when the user interacts with the dialog, so you can wait for the user interaction to continue your code execution. | ||
``` | ||
## Modal Dialog | ||
```tsx | ||
import { simpleModal } from 'react-simple-dialogs' | ||
const showPrompt = async () => { | ||
await simpleModal(closeFn => ( | ||
<div> | ||
<h1>My modal</h1> | ||
<p>My modal content, I can use this for anything I want!</p> | ||
<button onClick={closeFn}>Close</button> | ||
</div> | ||
)) | ||
console.log('Modal was closed') | ||
} | ||
``` |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
28
0
116
0
6940
3
0
2