react-hook-popup
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "react-hook-popup", | ||
"version": "0.0.1", | ||
"description": "Easily popups like alerts and modals in React with a single hook", | ||
"version": "0.0.2", | ||
"description": "Easily manage popups like alerts and modals in React with a single hook", | ||
"homepage": "https://github.com/aidanjw1/react-hook-popup#readme", | ||
@@ -6,0 +6,0 @@ "repository": "github:aidanjw1/react-hook-popup", |
@@ -14,4 +14,19 @@ # React Hook Popup | ||
### Basic Usage | ||
React Hook Popup is completely centered around one single, simple to use hook: `usePopup`. | ||
React Hook Popup is completely centered around one single, simple to use hook: `usePopup`. It can be imported like | ||
```javascript | ||
import { usePopup } from 'react-hook-popup'; | ||
``` | ||
Any component that uses this hook __must appear below the `<PopupProvider>` component__ in the tree. You probably want to wrap your whole application in this component. | ||
```javascript | ||
import { PopupProvider } from 'react-hook-popup'; | ||
``` | ||
```javascript | ||
<PopupProvider> | ||
<YourApplication /> | ||
</PopupProvider> | ||
``` | ||
The `usePopup` hook takes two arguments: | ||
@@ -18,0 +33,0 @@ - A `string` key that is unique to each popup. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18311
72