catchup-library-web 1.6.8 → 1.6.9

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/dist/index.d.mts CHANGED
@@ -23,15 +23,16 @@ declare const CancelButton: ({ title, size, onClick, disabled, iconPosition, tex
23
23
 
24
24
  declare const ApproveButton: ({ title, size, onClick, disabled, iconPosition, textOnly, iconOnly, }: IButtonProps) => react_jsx_runtime.JSX.Element;
25
25
 
26
+ declare const BaseImage: (props: IBaseImageProps) => react_jsx_runtime.JSX.Element | null;
26
27
  interface IBaseImageProps {
27
- ref?: any;
28
- size: string;
28
+ ref?: React.RefObject<HTMLImageElement>;
29
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge" | "2xlarge" | "3xlarge" | "4xlarge" | "custom";
29
30
  className?: string;
30
31
  widthClassName?: string;
31
32
  heightClassName?: string;
32
- src: string;
33
+ src?: string;
33
34
  hidden?: boolean;
34
- alt: string;
35
+ alt?: string;
35
36
  showLoading?: boolean;
36
37
  onLoad?: () => void;
37
38
  onClick?: (e: any) => void;
@@ -40,10 +41,9 @@ interface IBaseImageProps {
40
41
  dataToolTipPlace?: string;
41
42
  dataToolTipVariant?: string;
42
43
  dataToolTipHTML?: string;
44
+ borderRadius?: string;
43
45
  }
44
46
 
45
- declare const BaseImage: (props: IBaseImageProps) => react_jsx_runtime.JSX.Element | null;
46
-
47
47
  interface IBaseLoadingProps {
48
48
  height?: number;
49
49
  width?: number;
package/dist/index.d.ts CHANGED
@@ -23,15 +23,16 @@ declare const CancelButton: ({ title, size, onClick, disabled, iconPosition, tex
23
23
 
24
24
  declare const ApproveButton: ({ title, size, onClick, disabled, iconPosition, textOnly, iconOnly, }: IButtonProps) => react_jsx_runtime.JSX.Element;
25
25
 
26
+ declare const BaseImage: (props: IBaseImageProps) => react_jsx_runtime.JSX.Element | null;
26
27
  interface IBaseImageProps {
27
- ref?: any;
28
- size: string;
28
+ ref?: React.RefObject<HTMLImageElement>;
29
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge" | "2xlarge" | "3xlarge" | "4xlarge" | "custom";
29
30
  className?: string;
30
31
  widthClassName?: string;
31
32
  heightClassName?: string;
32
- src: string;
33
+ src?: string;
33
34
  hidden?: boolean;
34
- alt: string;
35
+ alt?: string;
35
36
  showLoading?: boolean;
36
37
  onLoad?: () => void;
37
38
  onClick?: (e: any) => void;
@@ -40,10 +41,9 @@ interface IBaseImageProps {
40
41
  dataToolTipPlace?: string;
41
42
  dataToolTipVariant?: string;
42
43
  dataToolTipHTML?: string;
44
+ borderRadius?: string;
43
45
  }
44
46
 
45
- declare const BaseImage: (props: IBaseImageProps) => react_jsx_runtime.JSX.Element | null;
46
-
47
47
  interface IBaseLoadingProps {
48
48
  height?: number;
49
49
  width?: number;
package/dist/index.js CHANGED
@@ -314,7 +314,9 @@ var BaseImage = (props) => {
314
314
  dataToolTipContent,
315
315
  dataToolTipPlace,
316
316
  dataToolTipVariant,
317
- dataToolTipHTML
317
+ dataToolTipHTML,
318
+ borderRadius
319
+ // Add this prop
318
320
  } = props;
319
321
  const [key, setKey] = (0, import_react.useState)((/* @__PURE__ */ new Date()).getTime());
320
322
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -370,7 +372,7 @@ var BaseImage = (props) => {
370
372
  "img",
371
373
  {
372
374
  ref,
373
- className: "w-full",
375
+ className: `w-full ${borderRadius || ""}`,
374
376
  src,
375
377
  alt,
376
378
  onLoad,
package/dist/index.mjs CHANGED
@@ -121,7 +121,9 @@ var BaseImage = (props) => {
121
121
  dataToolTipContent,
122
122
  dataToolTipPlace,
123
123
  dataToolTipVariant,
124
- dataToolTipHTML
124
+ dataToolTipHTML,
125
+ borderRadius
126
+ // Add this prop
125
127
  } = props;
126
128
  const [key, setKey] = useState((/* @__PURE__ */ new Date()).getTime());
127
129
  const [loading, setLoading] = useState(false);
@@ -177,7 +179,7 @@ var BaseImage = (props) => {
177
179
  "img",
178
180
  {
179
181
  ref,
180
- className: "w-full",
182
+ className: `w-full ${borderRadius || ""}`,
181
183
  src,
182
184
  alt,
183
185
  onLoad,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,6 +1,5 @@
1
1
  import { useState } from "react";
2
2
  import BaseLoading from "../loading/BaseLoading";
3
- import { IBaseImageProps } from "../../properties/ImageProperties";
4
3
 
5
4
  const BaseImage = (props: IBaseImageProps) => {
6
5
  const {
@@ -20,6 +19,7 @@ const BaseImage = (props: IBaseImageProps) => {
20
19
  dataToolTipPlace,
21
20
  dataToolTipVariant,
22
21
  dataToolTipHTML,
22
+ borderRadius, // Add this prop
23
23
  } = props;
24
24
  const [key, setKey] = useState(new Date().getTime());
25
25
  const [loading, setLoading] = useState(false);
@@ -84,7 +84,7 @@ const BaseImage = (props: IBaseImageProps) => {
84
84
  >
85
85
  <img
86
86
  ref={ref}
87
- className="w-full"
87
+ className={`w-full ${borderRadius || ""}`} // Apply border radius class here
88
88
  src={src}
89
89
  alt={alt}
90
90
  onLoad={onLoad}
@@ -98,4 +98,34 @@ const BaseImage = (props: IBaseImageProps) => {
98
98
  );
99
99
  };
100
100
 
101
+ // Then update your IBaseImageProps interface to include the borderRadius property
102
+ interface IBaseImageProps {
103
+ ref?: React.RefObject<HTMLImageElement>;
104
+ size?:
105
+ | "xsmall"
106
+ | "small"
107
+ | "medium"
108
+ | "large"
109
+ | "xlarge"
110
+ | "2xlarge"
111
+ | "3xlarge"
112
+ | "4xlarge"
113
+ | "custom";
114
+ className?: string;
115
+ widthClassName?: string;
116
+ heightClassName?: string;
117
+ src?: string;
118
+ hidden?: boolean;
119
+ alt?: string;
120
+ showLoading?: boolean;
121
+ onLoad?: () => void;
122
+ onClick?: (e: any) => void;
123
+ dataToolTipId?: string;
124
+ dataToolTipContent?: string;
125
+ dataToolTipPlace?: string;
126
+ dataToolTipVariant?: string;
127
+ dataToolTipHTML?: string;
128
+ borderRadius?: string; // Add this property
129
+ }
130
+
101
131
  export default BaseImage;