@sinco/react 1.1.2-rc.44 → 1.1.2-rc.48
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/index.esm.js
CHANGED
@@ -13234,16 +13234,19 @@ var EmptyStateImageUrls = {
|
|
13234
13234
|
search: 'search'
|
13235
13235
|
};
|
13236
13236
|
var DefaultIcon = function DefaultIcon(_ref) {
|
13237
|
-
var _ref$
|
13237
|
+
var _ref$state = _ref.state,
|
13238
|
+
state = _ref$state === void 0 ? 'create' : _ref$state,
|
13239
|
+
_ref$iconStyle = _ref.iconStyle,
|
13238
13240
|
iconStyle = _ref$iconStyle === void 0 ? {
|
13239
13241
|
width: '210px',
|
13240
13242
|
height: '185px'
|
13241
13243
|
} : _ref$iconStyle;
|
13244
|
+
var symbolId = emptyStateIcons[state];
|
13242
13245
|
return React__default.createElement("svg", {
|
13243
13246
|
"data-testid": "empty-state-icon",
|
13244
13247
|
style: iconStyle
|
13245
13248
|
}, React__default.createElement("use", {
|
13246
|
-
|
13249
|
+
href: "#".concat(symbolId)
|
13247
13250
|
}));
|
13248
13251
|
};
|
13249
13252
|
var EmptyState = function EmptyState(_ref2) {
|
@@ -13257,7 +13260,8 @@ var EmptyState = function EmptyState(_ref2) {
|
|
13257
13260
|
_ref2$icon = _ref2.icon,
|
13258
13261
|
icon = _ref2$icon === void 0 ? React__default.createElement(DefaultIcon, {
|
13259
13262
|
state: state,
|
13260
|
-
iconStyle: iconStyle
|
13263
|
+
iconStyle: iconStyle,
|
13264
|
+
title: ''
|
13261
13265
|
}) : _ref2$icon;
|
13262
13266
|
return React__default.createElement(Stack$1, {
|
13263
13267
|
alignItems: "center",
|
package/package.json
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
|
+
import emptyStateIcons from '../assets/emptyState-icons.svg';
|
2
3
|
export type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
|
4
|
+
export declare const EmptyStateImageUrls: Record<EmptyStateStates, string>;
|
3
5
|
export interface EmptyStateProperties {
|
4
6
|
icon?: ReactNode;
|
5
|
-
state?:
|
7
|
+
state?: keyof typeof emptyStateIcons | string;
|
6
8
|
title: string;
|
7
9
|
subtitle?: string;
|
8
10
|
actions?: ReactNode;
|
9
11
|
iconStyle?: React.CSSProperties;
|
10
12
|
containerHeight?: string;
|
11
13
|
}
|
12
|
-
export declare const EmptyStateImageUrls: Record<EmptyStateStates, string>;
|
13
14
|
export declare const EmptyState: ({ state, title, subtitle, actions, containerHeight, iconStyle, icon, }: EmptyStateProperties) => React.JSX.Element;
|