datastake-daf 0.6.158 → 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,
@@ -20655,8 +20659,7 @@ const WidgetCard = _ref => {
20655
20659
  className: "widget-card-logo-icon",
20656
20660
  href: link,
20657
20661
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
20658
- className: buttonIcon,
20659
- name: "Link",
20662
+ name: buttonIcon,
20660
20663
  size: 16,
20661
20664
  color: iconColor || antd.theme.colorPrimary
20662
20665
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.158",
3
+ "version": "0.6.160",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -22,7 +22,9 @@ export const Primary = {
22
22
  "link": "/app/mines/summary/LOC-00000000271",
23
23
  "logoIcon": "Kobo",
24
24
  "description": "This is a description of the widget card. It can be long and scrollable.",
25
- "buttonIcon": 'cursor-pointer',
25
+ "buttonIcon": 'ArrowUpRight',
26
+ "iconColor": "#ff0000",
27
+ "imageUrl": "https://picsum.photos/200/300",
26
28
  "data": [
27
29
  {
28
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,16 +25,18 @@ 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
  }
33
36
  addedHeader={
34
37
  <>
35
38
  <div className="flex-1" /><a className="widget-card-logo-icon" href={link}>
36
- <CustomIcon className={buttonIcon} name="Link" size={16} color={iconColor || theme.colorPrimary} />
39
+ <CustomIcon name={buttonIcon} size={16} color={iconColor || theme.colorPrimary} />
37
40
  </a>
38
41
  </>
39
42
  }