@sima-land/moleculas 12.1.0 → 12.2.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.
|
@@ -9,10 +9,11 @@ export interface ProductCardProps extends ProductInfoProps, React.HTMLAttributes
|
|
|
9
9
|
* @param props Свойства.
|
|
10
10
|
* @return Элемент.
|
|
11
11
|
*/
|
|
12
|
-
declare const CartControlSlot: ({ children, stepText, markupText, }: {
|
|
13
|
-
children
|
|
12
|
+
declare const CartControlSlot: ({ children, stepText, markupText, loading, }: {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
14
|
stepText?: string | undefined;
|
|
15
15
|
markupText?: string | undefined;
|
|
16
|
+
loading?: boolean | undefined;
|
|
16
17
|
}) => JSX.Element;
|
|
17
18
|
export interface ProductCardComponent extends React.ForwardRefExoticComponent<React.PropsWithoutRef<ProductCardProps> & React.RefAttributes<HTMLDivElement>> {
|
|
18
19
|
CartControl: typeof CartControlSlot;
|
|
@@ -50,10 +50,10 @@ const cx = bind_1.default.bind(product_card_module_scss_1.default);
|
|
|
50
50
|
* @param props Свойства.
|
|
51
51
|
* @return Элемент.
|
|
52
52
|
*/
|
|
53
|
-
const CartControlSlot = ({ children, stepText, markupText, }) => (react_1.default.createElement("div", { className: cx('control-wrapper') },
|
|
54
|
-
react_1.default.createElement("div", { className: cx('control') }, children),
|
|
55
|
-
stepText && (react_1.default.createElement("div", { className: cx('unit-text') }, stepText)),
|
|
56
|
-
markupText && (react_1.default.createElement("div", { className: cx('bottom-text') }, markupText))));
|
|
53
|
+
const CartControlSlot = ({ children, stepText, markupText, loading, }) => (react_1.default.createElement("div", { className: cx('control-wrapper', { loading }) },
|
|
54
|
+
react_1.default.createElement("div", { className: cx('control') }, !loading && children),
|
|
55
|
+
(loading || stepText) && (react_1.default.createElement("div", { className: cx('unit-text') }, !loading && stepText)),
|
|
56
|
+
!loading && markupText && (react_1.default.createElement("div", { className: cx('bottom-text') }, markupText))));
|
|
57
57
|
/**
|
|
58
58
|
* Карточка товара, появляющаяся над элементом карусели.
|
|
59
59
|
* @param props Свойства компонента.
|
|
@@ -16,6 +16,20 @@
|
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-wrap: wrap;
|
|
18
18
|
margin-top: 16px;
|
|
19
|
+
&.loading {
|
|
20
|
+
.control {
|
|
21
|
+
background: colors.$gray4;
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
}
|
|
24
|
+
.unit-text::before {
|
|
25
|
+
content: '';
|
|
26
|
+
display: block;
|
|
27
|
+
background: colors.$gray4;
|
|
28
|
+
border-radius: 4px;
|
|
29
|
+
width: 48px;
|
|
30
|
+
height: 16px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
19
33
|
}
|
|
20
34
|
|
|
21
35
|
.control {
|