@commercetools-uikit/card 18.0.0 → 18.1.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/README.md
CHANGED
|
@@ -20,11 +20,11 @@ npm --save install @commercetools-uikit/card
|
|
|
20
20
|
Additionally install the peer dependencies (if not present)
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
yarn add react
|
|
23
|
+
yarn add react react-router-dom
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
npm --save install react
|
|
27
|
+
npm --save install react react-router-dom
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
@@ -50,7 +50,15 @@ export default Example;
|
|
|
50
50
|
| `theme` | `union`<br/>Possible values:<br/>`'light' , 'dark'` | | `'light'` | Determines the background color of the card. |
|
|
51
51
|
| `className` | `string` | | | Pass a custom CSS class, useful to override the styles.
<br>
NOTE: This is not recommended and should only be used for building new components
that require special style adjustments. |
|
|
52
52
|
| `children` | `ReactNode` | | | |
|
|
53
|
-
| `onClick` | `()
|
|
54
|
-
| `to` | `union`<br/>Possible values:<br/>`string , LocationDescriptor` | | | The URL that the Card should point to.
|
|
55
|
-
| `isExternalLink` | `boolean` | | | A flag to indicate if the Card points to an external source.
|
|
56
|
-
| `isDisabled` | `boolean` | | | Indicates that a clickable Card should not allow clicks. This
|
|
53
|
+
| `onClick` | `Function`<br/>[See signature.](#signature-onClick) | | | The callback function to be executed when the Card component is clicked. Prefer this for managing side effects rather than navigation. |
|
|
54
|
+
| `to` | `union`<br/>Possible values:<br/>`string , LocationDescriptor` | | | The URL that the Card should point to. If provided, the Card will be rendered as an anchor element. |
|
|
55
|
+
| `isExternalLink` | `boolean` | | | A flag to indicate if the Card points to an external source. |
|
|
56
|
+
| `isDisabled` | `boolean` | | | Indicates that a clickable Card should not allow clicks. This allows consumers to temporarily disable a clickable Card. |
|
|
57
|
+
|
|
58
|
+
## Signatures
|
|
59
|
+
|
|
60
|
+
### Signature `onClick`
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
() => void
|
|
64
|
+
```
|
|
@@ -103,7 +103,7 @@ Card.defaultProps = defaultProps;
|
|
|
103
103
|
var Card$1 = Card;
|
|
104
104
|
|
|
105
105
|
// NOTE: This string will be replaced on build time with the package version.
|
|
106
|
-
var version = "18.
|
|
106
|
+
var version = "18.1.0";
|
|
107
107
|
|
|
108
108
|
exports["default"] = Card$1;
|
|
109
109
|
exports.version = version;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/card",
|
|
3
3
|
"description": "Cards are used to display content and actions on a single topic.",
|
|
4
|
-
"version": "18.
|
|
4
|
+
"version": "18.1.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/design-system": "18.
|
|
25
|
-
"@commercetools-uikit/spacings-inset": "18.
|
|
26
|
-
"@commercetools-uikit/utils": "18.
|
|
24
|
+
"@commercetools-uikit/design-system": "18.1.0",
|
|
25
|
+
"@commercetools-uikit/spacings-inset": "18.1.0",
|
|
26
|
+
"@commercetools-uikit/utils": "18.1.0",
|
|
27
27
|
"@emotion/react": "^11.10.5",
|
|
28
28
|
"@emotion/styled": "^11.10.5",
|
|
29
29
|
"@types/react-router-dom": "^5.3.3",
|