@oslokommune/punkt-react 16.8.2 → 16.9.0

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": "@oslokommune/punkt-react",
3
- "version": "16.8.2",
3
+ "version": "16.9.0",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@lit-labs/ssr-dom-shim": "^1.2.1",
41
41
  "@lit/react": "^1.0.7",
42
- "@oslokommune/punkt-elements": "^16.8.2",
42
+ "@oslokommune/punkt-elements": "^16.9.0",
43
43
  "classnames": "^2.5.1",
44
44
  "prettier": "^3.3.3",
45
45
  "react-hook-form": "^7.53.0"
@@ -109,5 +109,5 @@
109
109
  "url": "https://github.com/oslokommune/punkt/issues"
110
110
  },
111
111
  "license": "MIT",
112
- "gitHead": "1ff7d19b9d19c3b3e810dcee4bc3bd1d3fcc3610"
112
+ "gitHead": "b5986d27e787fefda72f847d65bb9b7de2ab5316"
113
113
  }
@@ -18,7 +18,7 @@ export interface IPktBackLink extends Omit<AnchorHTMLAttributes<HTMLAnchorElemen
18
18
  }
19
19
 
20
20
  export const PktBackLink = forwardRef<HTMLElement, IPktBackLink>(
21
- ({ href = '/', text = 'Forsiden', ariaLabel, renderLink, ...props }, ref) => {
21
+ ({ href = '/', text = 'Forsiden', ariaLabel, renderLink, className, ...props }, ref) => {
22
22
  const linkChildren = (
23
23
  <>
24
24
  <PktIcon className="pkt-back-link__icon pkt-icon pkt-link__icon" name="chevron-thin-left" aria-hidden="true" />
@@ -34,8 +34,10 @@ export const PktBackLink = forwardRef<HTMLElement, IPktBackLink>(
34
34
  </a>
35
35
  ))
36
36
 
37
+ const classes = ['pkt-back-link', className].filter(Boolean).join(' ')
38
+
37
39
  return (
38
- <nav className="pkt-back-link" aria-label={ariaLabel || 'Gå tilbake til forrige side'} ref={ref}>
40
+ <nav className={classes} aria-label={ariaLabel || 'Gå tilbake til forrige side'} ref={ref}>
39
41
  {linkRenderer({
40
42
  href,
41
43
  className: 'pkt-link pkt-link--icon-left',