@sb1/ffe-cards-react 16.2.2 → 17.0.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/es/CardBase.js +1 -1
- package/es/IconCard/IconCard.js +1 -1
- package/es/IllustrationCard/IllustrationCard.js +1 -1
- package/es/ImageCard/ImageCard.js +1 -1
- package/es/StippledCard/StippledCard.js +1 -1
- package/es/TextCard/TextCard.js +1 -1
- package/es/components/WithCardAction.js +22 -13
- package/lib/CardBase.js +1 -1
- package/lib/IconCard/IconCard.js +1 -1
- package/lib/IllustrationCard/IllustrationCard.js +1 -1
- package/lib/ImageCard/ImageCard.js +1 -1
- package/lib/StippledCard/StippledCard.js +1 -1
- package/lib/TextCard/TextCard.js +1 -1
- package/lib/components/WithCardAction.js +21 -12
- package/package.json +7 -7
- package/types/components/WithCardAction.d.ts +2 -0
package/es/CardBase.js
CHANGED
|
@@ -27,7 +27,7 @@ import { fixedForwardRef } from './fixedForwardRef';
|
|
|
27
27
|
function CardBaseWithForwardRef(props, ref) {
|
|
28
28
|
var _a;
|
|
29
29
|
var className = props.className, shadow = props.shadow, noMargin = props.noMargin, textCenter = props.textCenter, bgColor = props.bgColor, bgDarkmodeColor = props.bgDarkmodeColor, noPadding = props.noPadding, children = props.children, rest = __rest(props, ["className", "shadow", "noMargin", "textCenter", "bgColor", "bgDarkmodeColor", "noPadding", "children"]);
|
|
30
|
-
return (React.createElement(WithCardAction, __assign({ className: classNames('ffe-card-base', className, (_a = {},
|
|
30
|
+
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-card-base", className: classNames('ffe-card-base', className, (_a = {},
|
|
31
31
|
_a["ffe-card-base--bg-".concat(bgColor)] = bgColor,
|
|
32
32
|
_a["ffe-card-base--dm-bg-".concat(bgDarkmodeColor)] = bgDarkmodeColor,
|
|
33
33
|
_a['ffe-card-base--box-shadow'] = shadow,
|
package/es/IconCard/IconCard.js
CHANGED
|
@@ -26,7 +26,7 @@ import { WithCardAction, Text, Subtext, Title, CardName } from '../components';
|
|
|
26
26
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
27
27
|
function IconCardWithForwardRef(props, ref) {
|
|
28
28
|
var className = props.className, condensed = props.condensed, icon = props.icon, children = props.children, rest = __rest(props, ["className", "condensed", "icon", "children"]);
|
|
29
|
-
return (React.createElement(WithCardAction, __assign({ className: classNames('ffe-icon-card', { 'ffe-icon-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
29
|
+
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-icon-card", className: classNames('ffe-icon-card', { 'ffe-icon-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
30
30
|
var CardAction = _a.CardAction;
|
|
31
31
|
return (React.createElement(React.Fragment, null,
|
|
32
32
|
React.cloneElement(icon, __assign(__assign({}, icon.props), { className: classNames('ffe-icon-card__icon', icon.props.className) })),
|
|
@@ -26,7 +26,7 @@ import { WithCardAction, Text, Subtext, Title, CardName } from '../components';
|
|
|
26
26
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
27
27
|
function IllustrationCardWithForwardRef(props, ref) {
|
|
28
28
|
var className = props.className, condensed = props.condensed, img = props.img, children = props.children, rest = __rest(props, ["className", "condensed", "img", "children"]);
|
|
29
|
-
return (React.createElement(WithCardAction, __assign({ className: classNames('ffe-illustration-card', { 'ffe-illustration-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
29
|
+
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-illustration-card", className: classNames('ffe-illustration-card', { 'ffe-illustration-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
30
30
|
var CardAction = _a.CardAction;
|
|
31
31
|
return (React.createElement(React.Fragment, null,
|
|
32
32
|
React.createElement("div", { className: classNames('ffe-illustration-card__illustration') }, img),
|
|
@@ -26,7 +26,7 @@ import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
|
|
|
26
26
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
27
27
|
function ImageCardWithForwardRef(props, ref) {
|
|
28
28
|
var className = props.className, imageSrc = props.imageSrc, imageAltText = props.imageAltText, children = props.children, rest = __rest(props, ["className", "imageSrc", "imageAltText", "children"]);
|
|
29
|
-
return (React.createElement(WithCardAction, __assign({ className: classNames('ffe-image-card', className) }, rest, { ref: ref }), function (_a) {
|
|
29
|
+
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-image-card", className: classNames('ffe-image-card', className) }, rest, { ref: ref }), function (_a) {
|
|
30
30
|
var CardAction = _a.CardAction;
|
|
31
31
|
return (React.createElement(React.Fragment, null,
|
|
32
32
|
React.createElement("div", { className: "ffe-image-card__image-container" },
|
|
@@ -26,7 +26,7 @@ import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
|
|
|
26
26
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
27
27
|
function StippledCardWithForwardRef(props, ref) {
|
|
28
28
|
var className = props.className, condensed = props.condensed, img = props.img, children = props.children, rest = __rest(props, ["className", "condensed", "img", "children"]);
|
|
29
|
-
return (React.createElement(WithCardAction, __assign({ className: classNames('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
29
|
+
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-stippled-card", className: classNames('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
30
30
|
var CardAction = _a.CardAction;
|
|
31
31
|
return (React.createElement(React.Fragment, null,
|
|
32
32
|
img && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
|
package/es/TextCard/TextCard.js
CHANGED
|
@@ -26,7 +26,7 @@ import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
|
|
|
26
26
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
27
27
|
function TextCardWithForwardRef(props, ref) {
|
|
28
28
|
var className = props.className, leftAlign = props.leftAlign, children = props.children, rest = __rest(props, ["className", "leftAlign", "children"]);
|
|
29
|
-
return (React.createElement(WithCardAction, __assign({ className: classNames('ffe-text-card', { 'ffe-text-card--left-align': leftAlign }, className) }, rest, { ref: ref }), function (_a) {
|
|
29
|
+
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-text-card", className: classNames('ffe-text-card', { 'ffe-text-card--left-align': leftAlign }, className) }, rest, { ref: ref }), function (_a) {
|
|
30
30
|
var CardAction = _a.CardAction;
|
|
31
31
|
return typeof children === 'function'
|
|
32
32
|
? children({ Text: Text, Subtext: Subtext, Title: Title, CardName: CardName, CardAction: CardAction })
|
|
@@ -20,26 +20,35 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React, { useCallback, useRef } from 'react';
|
|
23
|
+
import React, { useCallback, useRef, useState, useEffect, } from 'react';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { mergeRefs } from '../mergeRefs';
|
|
26
26
|
import { CardAction } from './CardAction';
|
|
27
27
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
28
28
|
function WithCardActionForwardRef(props, ref) {
|
|
29
|
-
var children = props.children, _a = props.as, Comp = _a === void 0 ? 'div' : _a, onClick = props.onClick, rest = __rest(props, ["children", "as", "onClick"]);
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
var children = props.children, _a = props.as, Comp = _a === void 0 ? 'div' : _a, onClick = props.onClick, className = props.className, baseClassName = props.baseClassName, rest = __rest(props, ["children", "as", "onClick", "className", "baseClassName"]);
|
|
30
|
+
var cardActionInnerRef = useRef(null);
|
|
31
|
+
var _b = useState(), isUsingCardAction = _b[0], setIsUsingCardAction = _b[1];
|
|
32
|
+
/** Før att hover og focus skall fungera i browsers som ikke støtter :has.
|
|
33
|
+
* Allt med klassen '--clickable' kan eftervart fjernes. */
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
var isStillUsingCardAction = !!cardActionInnerRef.current;
|
|
36
|
+
if (isUsingCardAction !== isStillUsingCardAction) {
|
|
37
|
+
setIsUsingCardAction(isStillUsingCardAction);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
var PartialAppliedCardAction = useCallback(function (_a, cardActionRef) {
|
|
41
|
+
var cardActionClassName = _a.className, restCardAction = __rest(_a, ["className"]);
|
|
42
|
+
return (React.createElement(CardAction, __assign({ className: classNames(cardActionClassName, 'ffe-card__action', {
|
|
43
|
+
'ffe-card__action--raw': !cardActionClassName,
|
|
44
|
+
}), ref: cardActionRef
|
|
45
|
+
? mergeRefs([cardActionRef, cardActionInnerRef])
|
|
46
|
+
: cardActionInnerRef }, restCardAction)));
|
|
38
47
|
}, []);
|
|
39
|
-
return (React.createElement(Comp, __assign({}, rest, { onClick: function (e) {
|
|
48
|
+
return (React.createElement(Comp, __assign({}, rest, { className: classNames(className, isUsingCardAction && "".concat(baseClassName, "--clickable")), onClick: function (e) {
|
|
40
49
|
var _a, _b;
|
|
41
|
-
if (!((_a =
|
|
42
|
-
(_b =
|
|
50
|
+
if (!((_a = cardActionInnerRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
51
|
+
(_b = cardActionInnerRef.current) === null || _b === void 0 ? void 0 : _b.click();
|
|
43
52
|
}
|
|
44
53
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
45
54
|
}, ref: ref }), children({
|
package/lib/CardBase.js
CHANGED
|
@@ -33,7 +33,7 @@ var fixedForwardRef_1 = require("./fixedForwardRef");
|
|
|
33
33
|
function CardBaseWithForwardRef(props, ref) {
|
|
34
34
|
var _a;
|
|
35
35
|
var className = props.className, shadow = props.shadow, noMargin = props.noMargin, textCenter = props.textCenter, bgColor = props.bgColor, bgDarkmodeColor = props.bgDarkmodeColor, noPadding = props.noPadding, children = props.children, rest = __rest(props, ["className", "shadow", "noMargin", "textCenter", "bgColor", "bgDarkmodeColor", "noPadding", "children"]);
|
|
36
|
-
return (react_1.default.createElement(components_1.WithCardAction, __assign({ className: (0, classnames_1.default)('ffe-card-base', className, (_a = {},
|
|
36
|
+
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-card-base", className: (0, classnames_1.default)('ffe-card-base', className, (_a = {},
|
|
37
37
|
_a["ffe-card-base--bg-".concat(bgColor)] = bgColor,
|
|
38
38
|
_a["ffe-card-base--dm-bg-".concat(bgDarkmodeColor)] = bgDarkmodeColor,
|
|
39
39
|
_a['ffe-card-base--box-shadow'] = shadow,
|
package/lib/IconCard/IconCard.js
CHANGED
|
@@ -32,7 +32,7 @@ var components_1 = require("../components");
|
|
|
32
32
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
33
33
|
function IconCardWithForwardRef(props, ref) {
|
|
34
34
|
var className = props.className, condensed = props.condensed, icon = props.icon, children = props.children, rest = __rest(props, ["className", "condensed", "icon", "children"]);
|
|
35
|
-
return (react_1.default.createElement(components_1.WithCardAction, __assign({ className: (0, classnames_1.default)('ffe-icon-card', { 'ffe-icon-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
35
|
+
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-icon-card", className: (0, classnames_1.default)('ffe-icon-card', { 'ffe-icon-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
36
36
|
var CardAction = _a.CardAction;
|
|
37
37
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
38
|
react_1.default.cloneElement(icon, __assign(__assign({}, icon.props), { className: (0, classnames_1.default)('ffe-icon-card__icon', icon.props.className) })),
|
|
@@ -32,7 +32,7 @@ var components_1 = require("../components");
|
|
|
32
32
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
33
33
|
function IllustrationCardWithForwardRef(props, ref) {
|
|
34
34
|
var className = props.className, condensed = props.condensed, img = props.img, children = props.children, rest = __rest(props, ["className", "condensed", "img", "children"]);
|
|
35
|
-
return (react_1.default.createElement(components_1.WithCardAction, __assign({ className: (0, classnames_1.default)('ffe-illustration-card', { 'ffe-illustration-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
35
|
+
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-illustration-card", className: (0, classnames_1.default)('ffe-illustration-card', { 'ffe-illustration-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
36
36
|
var CardAction = _a.CardAction;
|
|
37
37
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
38
|
react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-illustration-card__illustration') }, img),
|
|
@@ -32,7 +32,7 @@ var components_1 = require("../components");
|
|
|
32
32
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
33
33
|
function ImageCardWithForwardRef(props, ref) {
|
|
34
34
|
var className = props.className, imageSrc = props.imageSrc, imageAltText = props.imageAltText, children = props.children, rest = __rest(props, ["className", "imageSrc", "imageAltText", "children"]);
|
|
35
|
-
return (react_1.default.createElement(components_1.WithCardAction, __assign({ className: (0, classnames_1.default)('ffe-image-card', className) }, rest, { ref: ref }), function (_a) {
|
|
35
|
+
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-image-card", className: (0, classnames_1.default)('ffe-image-card', className) }, rest, { ref: ref }), function (_a) {
|
|
36
36
|
var CardAction = _a.CardAction;
|
|
37
37
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
38
|
react_1.default.createElement("div", { className: "ffe-image-card__image-container" },
|
|
@@ -32,7 +32,7 @@ var components_1 = require("../components");
|
|
|
32
32
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
33
33
|
function StippledCardWithForwardRef(props, ref) {
|
|
34
34
|
var className = props.className, condensed = props.condensed, img = props.img, children = props.children, rest = __rest(props, ["className", "condensed", "img", "children"]);
|
|
35
|
-
return (react_1.default.createElement(components_1.WithCardAction, __assign({ className: (0, classnames_1.default)('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
35
|
+
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-stippled-card", className: (0, classnames_1.default)('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, className) }, rest, { ref: ref }), function (_a) {
|
|
36
36
|
var CardAction = _a.CardAction;
|
|
37
37
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
38
|
img && (react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-stippled-card__img', {
|
package/lib/TextCard/TextCard.js
CHANGED
|
@@ -32,7 +32,7 @@ var components_1 = require("../components");
|
|
|
32
32
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
33
33
|
function TextCardWithForwardRef(props, ref) {
|
|
34
34
|
var className = props.className, leftAlign = props.leftAlign, children = props.children, rest = __rest(props, ["className", "leftAlign", "children"]);
|
|
35
|
-
return (react_1.default.createElement(components_1.WithCardAction, __assign({ className: (0, classnames_1.default)('ffe-text-card', { 'ffe-text-card--left-align': leftAlign }, className) }, rest, { ref: ref }), function (_a) {
|
|
35
|
+
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-text-card", className: (0, classnames_1.default)('ffe-text-card', { 'ffe-text-card--left-align': leftAlign }, className) }, rest, { ref: ref }), function (_a) {
|
|
36
36
|
var CardAction = _a.CardAction;
|
|
37
37
|
return typeof children === 'function'
|
|
38
38
|
? children({ Text: components_1.Text, Subtext: components_1.Subtext, Title: components_1.Title, CardName: components_1.CardName, CardAction: CardAction })
|
|
@@ -55,20 +55,29 @@ var mergeRefs_1 = require("../mergeRefs");
|
|
|
55
55
|
var CardAction_1 = require("./CardAction");
|
|
56
56
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
57
57
|
function WithCardActionForwardRef(props, ref) {
|
|
58
|
-
var children = props.children, _a = props.as, Comp = _a === void 0 ? 'div' : _a, onClick = props.onClick, rest = __rest(props, ["children", "as", "onClick"]);
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
var children = props.children, _a = props.as, Comp = _a === void 0 ? 'div' : _a, onClick = props.onClick, className = props.className, baseClassName = props.baseClassName, rest = __rest(props, ["children", "as", "onClick", "className", "baseClassName"]);
|
|
59
|
+
var cardActionInnerRef = (0, react_1.useRef)(null);
|
|
60
|
+
var _b = (0, react_1.useState)(), isUsingCardAction = _b[0], setIsUsingCardAction = _b[1];
|
|
61
|
+
/** Før att hover og focus skall fungera i browsers som ikke støtter :has.
|
|
62
|
+
* Allt med klassen '--clickable' kan eftervart fjernes. */
|
|
63
|
+
(0, react_1.useEffect)(function () {
|
|
64
|
+
var isStillUsingCardAction = !!cardActionInnerRef.current;
|
|
65
|
+
if (isUsingCardAction !== isStillUsingCardAction) {
|
|
66
|
+
setIsUsingCardAction(isStillUsingCardAction);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
var PartialAppliedCardAction = (0, react_1.useCallback)(function (_a, cardActionRef) {
|
|
70
|
+
var cardActionClassName = _a.className, restCardAction = __rest(_a, ["className"]);
|
|
71
|
+
return (react_1.default.createElement(CardAction_1.CardAction, __assign({ className: (0, classnames_1.default)(cardActionClassName, 'ffe-card__action', {
|
|
72
|
+
'ffe-card__action--raw': !cardActionClassName,
|
|
73
|
+
}), ref: cardActionRef
|
|
74
|
+
? (0, mergeRefs_1.mergeRefs)([cardActionRef, cardActionInnerRef])
|
|
75
|
+
: cardActionInnerRef }, restCardAction)));
|
|
67
76
|
}, []);
|
|
68
|
-
return (react_1.default.createElement(Comp, __assign({}, rest, { onClick: function (e) {
|
|
77
|
+
return (react_1.default.createElement(Comp, __assign({}, rest, { className: (0, classnames_1.default)(className, isUsingCardAction && "".concat(baseClassName, "--clickable")), onClick: function (e) {
|
|
69
78
|
var _a, _b;
|
|
70
|
-
if (!((_a =
|
|
71
|
-
(_b =
|
|
79
|
+
if (!((_a = cardActionInnerRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
80
|
+
(_b = cardActionInnerRef.current) === null || _b === void 0 ? void 0 : _b.click();
|
|
72
81
|
}
|
|
73
82
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
74
83
|
}, ref: ref }), children({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-cards-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "React implementation of ffe-react",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"test:watch": "ffe-buildtool jest --watch"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sb1/ffe-cards": "^19.1.
|
|
29
|
+
"@sb1/ffe-cards": "^19.1.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@sb1/ffe-buildtool": "^0.6.4",
|
|
33
|
-
"@sb1/ffe-icons-react": "^
|
|
34
|
-
"react": "^
|
|
35
|
-
"react-dom": "^
|
|
33
|
+
"@sb1/ffe-icons-react": "^11.0.0",
|
|
34
|
+
"react": "^18.2.0",
|
|
35
|
+
"react-dom": "^18.2.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"react": ">=
|
|
38
|
+
"react": ">=18.2.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "7ec0994fdb87d1f4daa66d7595a22f79d17cc450"
|
|
44
44
|
}
|
|
@@ -2,11 +2,13 @@ import React, { ElementType } from 'react';
|
|
|
2
2
|
import { CardAction } from './CardAction';
|
|
3
3
|
import { ComponentAsPropParams } from '../types';
|
|
4
4
|
export type WithCardActionProps<As extends ElementType = 'div'> = Omit<ComponentAsPropParams<As>, 'children'> & {
|
|
5
|
+
baseClassName: string;
|
|
5
6
|
children: (props: {
|
|
6
7
|
CardAction: typeof CardAction;
|
|
7
8
|
}) => React.ReactNode;
|
|
8
9
|
};
|
|
9
10
|
export declare const WithCardAction: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
|
+
baseClassName: string;
|
|
10
12
|
children: (props: {
|
|
11
13
|
CardAction: typeof CardAction;
|
|
12
14
|
}) => React.ReactNode;
|