datastake-daf 0.6.159 → 0.6.160

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.
@@ -20624,7 +20624,8 @@ const WidgetCard = _ref => {
20624
20624
  description,
20625
20625
  loading = false,
20626
20626
  iconColor,
20627
- buttonIcon
20627
+ buttonIcon,
20628
+ imageUrl
20628
20629
  } = _ref;
20629
20630
  useToken$h();
20630
20631
  return /*#__PURE__*/jsxRuntime.jsx(Style$x, {
@@ -20636,7 +20637,10 @@ const WidgetCard = _ref => {
20636
20637
  display: "flex",
20637
20638
  alignItems: "center"
20638
20639
  },
20639
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
20640
+ children: [imageUrl ? /*#__PURE__*/jsxRuntime.jsx("img", {
20641
+ src: imageUrl,
20642
+ className: "widget-card-logo-icon mr-2"
20643
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
20640
20644
  className: "widget-card-logo-icon mr-2",
20641
20645
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
20642
20646
  name: logoIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.159",
3
+ "version": "0.6.160",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -24,6 +24,7 @@ export const Primary = {
24
24
  "description": "This is a description of the widget card. It can be long and scrollable.",
25
25
  "buttonIcon": 'ArrowUpRight',
26
26
  "iconColor": "#ff0000",
27
+ "imageUrl": "https://picsum.photos/200/300",
27
28
  "data": [
28
29
  {
29
30
  "label": "Type",
@@ -16,7 +16,8 @@ const WidgetCard = ({
16
16
  description,
17
17
  loading=false,
18
18
  iconColor,
19
- buttonIcon
19
+ buttonIcon,
20
+ imageUrl,
20
21
  }) => {
21
22
  const { token } = useToken();
22
23
  return (
@@ -24,9 +25,11 @@ const WidgetCard = ({
24
25
  <Widget
25
26
  title={
26
27
  <div style={{display: "flex", alignItems: "center"}}>
27
- <div className="widget-card-logo-icon mr-2">
28
- <CustomIcon name={logoIcon} width={25} height={25} />
29
- </div>
28
+ {imageUrl ? <img src={imageUrl} className="widget-card-logo-icon mr-2" />
29
+ : <div className="widget-card-logo-icon mr-2">
30
+ <CustomIcon name={logoIcon} width={25} height={25} />
31
+ </div>
32
+ }
30
33
  <Tooltip title={title}>{title}</Tooltip>
31
34
  </div>
32
35
  }