@greghowe79/the-lib 0.2.8 → 0.3.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.
@@ -23,7 +23,7 @@ const Button = qwik.component$(({ id, label, variant = "primary", icon, disabled
23
23
  icon && /* @__PURE__ */ jsxRuntime.jsx("span", {
24
24
  class: "button__icon",
25
25
  "aria-hidden": "true",
26
- children: icon
26
+ children: typeof icon === "function" ? icon({}, null, 0) : icon
27
27
  }),
28
28
  /* @__PURE__ */ jsxRuntime.jsx("span", {
29
29
  class: "button__text",
@@ -21,7 +21,7 @@ const Button = component$(({ id, label, variant = "primary", icon, disabled = fa
21
21
  icon && /* @__PURE__ */ jsx("span", {
22
22
  class: "button__icon",
23
23
  "aria-hidden": "true",
24
- children: icon
24
+ children: typeof icon === "function" ? icon({}, null, 0) : icon
25
25
  }),
26
26
  /* @__PURE__ */ jsx("span", {
27
27
  class: "button__text",
@@ -1,4 +1,4 @@
1
- import { Component, JSXNode, JSXOutput, QRL, QwikIntrinsicElements } from '@builder.io/qwik';
1
+ import { Component, JSXOutput, QRL } from '@builder.io/qwik';
2
2
  import '@fontsource/roboto-condensed/500.css';
3
3
  export type ButtonVariant = 'primary' | 'secondary' | 'danger';
4
4
  export type ButtonType = 'button' | 'submit' | 'reset';
@@ -7,7 +7,7 @@ export interface ButtonProps {
7
7
  id: string;
8
8
  label: string;
9
9
  variant?: ButtonVariant;
10
- icon?: JSXNode | Component<unknown> | QRL<(props: QwikIntrinsicElements['svg'], key: string) => JSXOutput>;
10
+ icon?: JSXOutput | Component<unknown>;
11
11
  disabled?: boolean;
12
12
  ariaLabel?: string;
13
13
  type?: ButtonType;
@@ -1,4 +1,4 @@
1
- import { type Component, type QRL, JSXNode, QwikIntrinsicElements, JSXOutput } from '@builder.io/qwik';
1
+ import { type Component, type QRL, JSXOutput } from '@builder.io/qwik';
2
2
  import '@fontsource/roboto-condensed/500.css';
3
3
  export interface NavigationMenuProps {
4
4
  ariaLabel?: string;
@@ -11,7 +11,7 @@ export interface NavigationMenuProps {
11
11
  id: string;
12
12
  label?: string;
13
13
  onClick$?: QRL<() => void>;
14
- icon?: JSXNode | Component<unknown> | QRL<(props: QwikIntrinsicElements['svg'], key: string) => JSXOutput>;
14
+ icon?: JSXOutput | Component<unknown>;
15
15
  }>;
16
16
  }
17
17
  export declare const NavigationMenu: Component<NavigationMenuProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",