@synerise/ds-card 0.11.0 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.12.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@0.11.2...@synerise/ds-card@0.12.0) (2022-06-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **filter:** fixes closing info-card when clicking on it ([91eed3b](https://github.com/Synerise/synerise-design/commit/91eed3b7a5392c04ed618c9f7265608d6c39655e))
12
+
13
+
14
+ ### Features
15
+
16
+ * **card:** add badgeSlot prop ([7a84088](https://github.com/Synerise/synerise-design/commit/7a84088790b91958a85bd8ea0eafb295267886da))
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.11.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@0.11.1...@synerise/ds-card@0.11.2) (2022-03-30)
23
+
24
+ **Note:** Version bump only for package @synerise/ds-card
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.11.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@0.11.0...@synerise/ds-card@0.11.1) (2022-03-21)
31
+
32
+ **Note:** Version bump only for package @synerise/ds-card
33
+
34
+
35
+
36
+
37
+
6
38
  # [0.11.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@0.10.5...@synerise/ds-card@0.11.0) (2022-03-14)
7
39
 
8
40
 
package/README.md CHANGED
@@ -74,6 +74,7 @@ yarn add @synerise/ds-card
74
74
  | --------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- |
75
75
  | background | Background of Card container | `white` / `white-shadow` / `grey` / `grey-shadow` / `outline` | `white` |
76
76
  | children | Defines if the button casts a shadow when the cursor is hovered over | React.ReactNode | - |
77
+ | renderBadge | Custom slot content for badge icon | React.ReactNode? | - |
77
78
  | className | Defines the class name of the container | string | - |
78
79
  | compactHeader | Set as `true`, displays the description next to the header. Set as `false`, displays the description below the header | boolean | - |
79
80
  | description | Defines the content of the card description (in the header) | React.ReactNode | string |
package/dist/Card/Card.js CHANGED
@@ -17,6 +17,7 @@ var Card = function Card(_ref) {
17
17
  description = _ref.description,
18
18
  compactHeader = _ref.compactHeader,
19
19
  icon = _ref.icon,
20
+ renderBadge = _ref.renderBadge,
20
21
  iconColor = _ref.iconColor,
21
22
  headerSideChildren = _ref.headerSideChildren,
22
23
  onHeaderClick = _ref.onHeaderClick,
@@ -50,7 +51,7 @@ var Card = function Card(_ref) {
50
51
  }, /*#__PURE__*/React.createElement(Icon, {
51
52
  component: icon,
52
53
  color: iconColor
53
- })), /*#__PURE__*/React.createElement(S.HeaderContent, {
54
+ })) || renderBadge && renderBadge(), /*#__PURE__*/React.createElement(S.HeaderContent, {
54
55
  compact: compactHeader,
55
56
  hasIcon: !!icon
56
57
  }, title && /*#__PURE__*/React.createElement(S.Title, {
@@ -13,6 +13,7 @@ export interface CardProps {
13
13
  title?: React.ReactNode;
14
14
  description?: React.ReactNode;
15
15
  icon?: React.ReactNode;
16
+ renderBadge?: () => React.ReactNode;
16
17
  iconColor?: string;
17
18
  staticContent?: React.ReactNode;
18
19
  headerSideChildren?: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-card",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Card UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-icon": "^0.47.2",
35
+ "@synerise/ds-icon": "^0.49.0",
36
36
  "@synerise/ds-typography": "^0.12.2",
37
37
  "@synerise/ds-utils": "^0.8.31",
38
38
  "react-animate-height": "^2.0.23",
@@ -43,5 +43,5 @@
43
43
  "antd": "^4",
44
44
  "react": ">=16.9.0 < 17.0.0"
45
45
  },
46
- "gitHead": "739b52320bb20c1646371224de5bb0c3454fac8c"
46
+ "gitHead": "d787395998e479858cb58f6d56555e4c51fe45d5"
47
47
  }