You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-24Lines changed: 25 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@
6
6
7
7
## Features
8
8
9
-
-**Only 3.68KB** (gzipped!).
10
-
-**Support the full `window.open` api**.
11
-
-**Built for React 16** (uses `ReactDOM.createPortal`).
12
-
-**Handler for blocked popups** (via `onBlock` prop).
13
-
-**Center popups** according to the parent _window_ or _screen_.
9
+
-**Only 3.68KB** (gzipped!).
10
+
-**Support the full `window.open` api**.
11
+
-**Built for React 16** (uses `ReactDOM.createPortal`).
12
+
-**Handler for blocked popups** (via `onBlock` prop).
13
+
-**Center popups** according to the parent _window_ or _screen_.
14
14
15
15
## Installation
16
16
@@ -37,18 +37,18 @@ The `children` contents is what will be rendered into the new popup window. In t
37
37
38
38
## Documentation
39
39
40
-
| Properties | Type | Default|Description |
41
-
| ---| ---| ---| ---|
42
-
|`url`|`String`|``| The URL to open, if specified any `children` will be overriden ([more details on `url`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)). |
43
-
|`name`|`String`|``| The name of the window ([more details on `windowName`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)). |
44
-
|`title`|`String`|``| The title of the new window document. |
45
-
|`features`|`Object`|`{}`| The set of window features ([more details on `windowFeatures`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features)). |
46
-
|`onUnload`|`Function`|`undefined`| A function to be triggered before the new window unload. |
47
-
|`onBlock`|`Function`|`undefined`| A function to be triggered when the new window could not be opened. |
48
-
|`onOpen`|`Function(w: Window)`|`undefined`| A function to be triggered when window open by library. |
49
-
|`center`|`String`|`parent`| Indicate how to center the new window. Valid values are: `parent` or `screen`. `parent` will center the new window according to its _parent_ window. `screen` will center the new window according to the _screen_. |
50
-
|`copyStyles`|`Boolean`|`true`| If specified, copy styles from parent window's document. |
51
-
|`closeOnUnmount`|`Boolean`|`true`| If specified, close the new window on unmount. |
|`url`|`String`|``| The URL to open, if specified any `children` will be overriden ([more details on `url`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)).|
43
+
|`name`|`String`|``| The name of the window ([more details on `windowName`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)).|
44
+
|`title`|`String`|``| The title of the new window document.|
45
+
|`features`|`Object`|`{}`| The set of window features ([more details on `windowFeatures`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features)).|
46
+
|`onUnload`|`Function`|`undefined`| A function to be triggered before the new window unload.|
47
+
|`onBlock`|`Function`|`undefined`| A function to be triggered when the new window could not be opened.|
48
+
|`onOpen`|`Function(w: Window)`|`undefined`| A function to be triggered when window open by library.|
49
+
|`center`|`String`|`parent`| Indicate how to center the new window. Valid values are: `parent` or `screen`. `parent` will center the new window according to its _parent_ window. `screen` will center the new window according to the _screen_. |
50
+
|`copyStyles`|`Boolean`|`true`| If specified, copy styles from parent window's document.|
51
+
|`closeOnUnmount`|`Boolean`|`true`| If specified, close the new window on unmount.|
52
52
53
53
## Tests
54
54
@@ -58,19 +58,20 @@ Tests are manually done using Storybook. It can be run locally with: `yarn story
58
58
59
59
To start contributing to this project, please do:
60
60
61
-
1. Fork and clone this repo.
62
-
2. Do your work.
63
-
3. Create a PR.
61
+
1. Fork and clone this repo.
62
+
2. Do your work.
63
+
3. Create a PR.
64
64
65
65
## Releases
66
66
67
-
```sh
68
-
npm version
69
-
```
67
+
The release process consists of two operations:
68
+
69
+
1. Create new version using: `npm version`
70
+
2.[This GitHub action](.github/workflows/publish.yml) will publish the new version to NPM.
0 commit comments