@not-govuk/back-link 0.4.2 → 0.5.2

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/dist/BackLink.js +1 -1
  2. package/package.json +21 -11
package/dist/BackLink.js CHANGED
@@ -7,6 +7,6 @@ export const BackLink = ({ children, classBlock, classModifiers, className, href
7
7
  const defaultClassBlock = 'govuk-back-link';
8
8
  const classes = classBuilder(defaultClassBlock, classBlock, classModifiers, className);
9
9
  const history = useHistory();
10
- return href ? (h(A, Object.assign({}, attrs, { classBlock: classBlock || defaultClassBlock, classModifiers: classModifiers, className: className, href: href }), text)) : (h("a", Object.assign({}, attrs, { className: classes(), href: "#", onClick: history.goBack }), text));
10
+ return href ? (h(A, { ...attrs, classBlock: classBlock || defaultClassBlock, classModifiers: classModifiers, className: className, href: href }, text)) : (h("a", { ...attrs, className: classes(), href: "#", onClick: history.goBack }, text));
11
11
  };
12
12
  export default BackLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@not-govuk/back-link",
3
- "version": "0.4.2",
3
+ "version": "0.5.2",
4
4
  "description": "A component to help users navigate back one page.",
5
5
  "main": "dist/BackLink.js",
6
6
  "sass": "assets/BackLink.scss",
@@ -14,22 +14,32 @@
14
14
  "react-components"
15
15
  ],
16
16
  "dependencies": {
17
- "@not-govuk/component-helpers": "^0.4.0",
18
- "@not-govuk/link": "^0.4.0",
19
- "@not-govuk/sass-base": "^0.4.0",
17
+ "@not-govuk/component-helpers": "^0.5.2",
18
+ "@not-govuk/link": "^0.5.2",
19
+ "@not-govuk/sass-base": "^0.5.2",
20
20
  "govuk-frontend": "3.11.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@not-govuk/docs-components": "^0.2.0 || ^0.3.0",
24
- "react": "^16.9.35"
23
+ "@not-govuk/docs-components": "^0.5.2",
24
+ "@storybook/addon-docs": "^6.4.0",
25
+ "react": "^16.9.55"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "@not-govuk/docs-components": {
29
+ "optional": true
30
+ },
31
+ "@storybook/addon-docs": {
32
+ "optional": true
33
+ }
25
34
  },
26
35
  "devDependencies": {
27
36
  "@mdx-js/react": "1.6.22",
28
- "@not-govuk/component-test-helpers": "^0.4.0",
29
- "@types/react": "16.14.24",
30
- "jest": "27.5.1",
31
- "ts-jest": "27.1.3",
32
- "typescript": "3.9.10"
37
+ "@not-govuk/component-test-helpers": "^0.5.2",
38
+ "@types/react": "16.14.28",
39
+ "jest": "28.1.3",
40
+ "jest-environment-jsdom": "28.1.3",
41
+ "ts-jest": "28.0.7",
42
+ "typescript": "4.6.4"
33
43
  },
34
44
  "scripts": {
35
45
  "test": "jest",