@luscii-healthtech/web-ui 2.48.1 → 2.48.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.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { IconProps } from "../Icons/types/IconProps.type";
2
+ import type { IconKey, IconProps } from "../Icons/types/IconProps.type";
3
3
  import { TextColor, TextHoverColor } from "../Text/Text";
4
4
  /**
5
5
  * Properties that are present in all variants of the button
@@ -8,7 +8,7 @@ import { TextColor, TextHoverColor } from "../Text/Text";
8
8
  export interface BaseButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
9
9
  onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
10
10
  text?: string;
11
- icon?: React.FunctionComponent<IconProps>;
11
+ icon?: React.FunctionComponent<IconProps> | IconKey;
12
12
  isDisabled?: boolean;
13
13
  className?: string;
14
14
  }
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import { ConfirmationDialogTitleProps } from "./types/ConfirmationDialog.types";
2
+ import type { ConfirmationDialogTitleProps } from "./types/ConfirmationDialog.types";
3
3
  export declare const ConfirmationDialogTitle: React.FC<ConfirmationDialogTitleProps>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IconProps } from "../../Icons/types/IconProps.type";
2
+ import type { IconKey, IconProps } from "../../Icons/types/IconProps.type";
3
3
  import type { NotificationBannerColor } from "../../NotificationBanner/NotificationBanner";
4
4
  interface ConfirmationDialogTexts {
5
5
  message: string | string[];
@@ -23,7 +23,7 @@ export interface ConfirmationDialogProps {
23
23
  isProcessing?: boolean;
24
24
  withTitle?: {
25
25
  title: string;
26
- icon?: React.FC<IconProps>;
26
+ icon?: React.FC<IconProps> | IconKey;
27
27
  };
28
28
  choices?: {
29
29
  defaultChoice?: ConfirmationDialogChoice["value"];
@@ -3,4 +3,11 @@ import { IconProps, IconKey } from "../Icons/types/IconProps.type";
3
3
  export declare const Icon: React.FC<{
4
4
  name: IconKey;
5
5
  } & IconProps>;
6
+ /**
7
+ * This is a temporary component to transition the way we pass icons to components.
8
+ * Once all components are passed an IconKey instead of a function component we can replace it with the Icon component.
9
+ */
10
+ export declare const IconComponentOrKey: React.FC<{
11
+ name: React.FunctionComponent<IconProps> | IconKey;
12
+ } & IconProps>;
6
13
  export default Icon;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { AllowedTextInputTypes } from "../Form/form.types";
3
- import { IconProps } from "../Icons/types/IconProps.type";
3
+ import type { IconKey, IconProps } from "../Icons/types/IconProps.type";
4
4
  import { FormFieldWidth } from "../Form/form.types";
5
5
  import "./Input.css";
6
6
  export declare const INPUT_TYPES: Record<string, AllowedTextInputTypes>;
@@ -27,7 +27,7 @@ export interface InputProps extends CustomHTMLInputProps {
27
27
  isDisabled?: boolean;
28
28
  withPrefix?: string;
29
29
  withSuffix?: string;
30
- icon?: React.VoidFunctionComponent<IconProps>;
30
+ icon?: React.FC<IconProps> | IconKey;
31
31
  width?: FormFieldWidth;
32
32
  /**
33
33
  * Check the `asFormField` prop of this component to understand why this signature.