@dmsi/wedgekit-react 0.0.384 → 0.0.385

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.
@@ -432,6 +432,7 @@ Paragraph.displayName = "Paragraph";
432
432
  var import_jsx_runtime3 = require("react/jsx-runtime");
433
433
  var SideMenuItem = ({
434
434
  id,
435
+ as = "a",
435
436
  testid,
436
437
  label,
437
438
  leftIcon,
@@ -453,8 +454,9 @@ var SideMenuItem = ({
453
454
  "bg-background-action-secondary-disabled border-border-action-disabled"
454
455
  );
455
456
  const enabledDisabledStyles = disabled ? (0, import_clsx4.default)("text-text-action-disabled pointer-events-none") : (0, import_clsx4.default)("text-text-primary-normal");
457
+ const Element = as;
456
458
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
457
- "a",
459
+ Element,
458
460
  {
459
461
  id,
460
462
  "data-testid": testid,
@@ -15,6 +15,7 @@ import clsx from "clsx";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
16
  var SideMenuItem = ({
17
17
  id,
18
+ as = "a",
18
19
  testid,
19
20
  label,
20
21
  leftIcon,
@@ -36,8 +37,9 @@ var SideMenuItem = ({
36
37
  "bg-background-action-secondary-disabled border-border-action-disabled"
37
38
  );
38
39
  const enabledDisabledStyles = disabled ? clsx("text-text-action-disabled pointer-events-none") : clsx("text-text-primary-normal");
40
+ const Element = as;
39
41
  return /* @__PURE__ */ jsx(
40
- "a",
42
+ Element,
41
43
  {
42
44
  id,
43
45
  "data-testid": testid,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmsi/wedgekit-react",
3
3
  "private": false,
4
- "version": "0.0.384",
4
+ "version": "0.0.385",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
@@ -5,6 +5,7 @@ import { Paragraph } from "./Paragraph";
5
5
 
6
6
  export type SideMenuItemProps = {
7
7
  id?: string;
8
+ as?: React.ElementType;
8
9
  testid?: string;
9
10
  label?: string;
10
11
  leftIcon?: React.ReactNode;
@@ -18,6 +19,7 @@ export type SideMenuItemProps = {
18
19
 
19
20
  export const SideMenuItem = ({
20
21
  id,
22
+ as = "a",
21
23
  testid,
22
24
  label,
23
25
  leftIcon,
@@ -53,9 +55,9 @@ export const SideMenuItem = ({
53
55
  const enabledDisabledStyles = disabled
54
56
  ? clsx("text-text-action-disabled pointer-events-none")
55
57
  : clsx("text-text-primary-normal");
56
-
58
+ const Element = as;
57
59
  return (
58
- <a
60
+ <Element
59
61
  id={id}
60
62
  data-testid={testid}
61
63
  href={href}
@@ -100,7 +102,7 @@ export const SideMenuItem = ({
100
102
 
101
103
  {rightIcon && rightIcon}
102
104
  </Stack>
103
- </a>
105
+ </Element>
104
106
  );
105
107
  };
106
108