@khanacademy/wonder-blocks-link 3.8.0 → 3.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-link",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,10 +15,10 @@
15
15
  "author": "",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@babel/runtime": "^7.13.10",
19
- "@khanacademy/wonder-blocks-clickable": "^2.2.0",
20
- "@khanacademy/wonder-blocks-color": "^1.1.19",
21
- "@khanacademy/wonder-blocks-core": "^3.2.0"
18
+ "@babel/runtime": "^7.16.3",
19
+ "@khanacademy/wonder-blocks-clickable": "^2.2.1",
20
+ "@khanacademy/wonder-blocks-color": "^1.1.20",
21
+ "@khanacademy/wonder-blocks-core": "^4.0.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "aphrodite": "^1.2.5",
@@ -27,7 +27,7 @@
27
27
  "react-router-dom": "5.3.0"
28
28
  },
29
29
  "devDependencies": {
30
- "wb-dev-build-settings": "^0.1.2"
30
+ "wb-dev-build-settings": "^0.2.0"
31
31
  },
32
- "gitHead": "b6193f70c73e70fbaf76bc688dc69a47fb1d0ef3"
32
+ "gitHead": "9ebea88533e702011165072f090a377e02fa3f0f"
33
33
  }
@@ -15,7 +15,8 @@ describe("Link", () => {
15
15
  beforeEach(() => {
16
16
  // Note: window.location.assign needs a mock function in the testing
17
17
  // environment.
18
- window.location.assign = jest.fn();
18
+ delete window.location;
19
+ window.location = {assign: jest.fn()};
19
20
  });
20
21
 
21
22
  afterEach(() => {
@@ -35,3 +35,9 @@ import Link from "@khanacademy/wonder-blocks-link";
35
35
  </Link>
36
36
  </View>
37
37
  ```
38
+
39
+ ### Running callbacks on navigation
40
+
41
+ The `onClick`, `beforeNav`, and `safeWithNav` props can be used to run callbacks
42
+ when navigating to the new URL. Which prop to use depends on the use case. See
43
+ the [Button](#section-button) documentation for details.