taro-react-uilib 1.3.4-8 → 1.3.4-9
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 +15 -0
- package/dist/components/Cell/index.js +1 -1
- package/dist/components/Cell/index.js.map +1 -1
- package/dist/components/Popup/index.js +1 -1
- package/dist/components/Popup/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/lib/components/Cell/index.js +3 -3
- package/lib/components/Popup/index.js +3 -3
- package/lib/components/Popup/index.js.map +1 -1
- package/package.json +1 -1
- package/types/components/Popup/index.d.ts +1 -0
|
@@ -14,10 +14,10 @@ const XHCell = props => {
|
|
|
14
14
|
return (React.createElement(View, { className: cellcls, onClick: handleClick },
|
|
15
15
|
icon && React.createElement(View, { className: "xh-cell-icon" }, icon),
|
|
16
16
|
React.createElement(View, { className: mainCls },
|
|
17
|
-
content && React.createElement(
|
|
18
|
-
contentDescription && (React.createElement(
|
|
17
|
+
content && React.createElement(View, { className: "xh-cell-main-content" }, content),
|
|
18
|
+
contentDescription && (React.createElement(View, { className: "xh-cell-main-description" }, contentDescription))),
|
|
19
19
|
React.createElement(View, { className: "xh-cell-description", style: { color: descriptionColor } },
|
|
20
|
-
description ? (React.createElement(
|
|
20
|
+
description ? (React.createElement(View, null, description)) : (React.createElement(View, { className: "xh-cell-description-placeholder" }, placeholder)),
|
|
21
21
|
React.createElement(Text, { className: "xh-cell-description-sub" }, subDescription)),
|
|
22
22
|
React.createElement(View, { className: "xh-cell-value" },
|
|
23
23
|
React.createElement(View, { className: "xh-cell-value-info", style: { color: valueColor } }, value),
|
|
@@ -12,7 +12,7 @@ const positionMap = {
|
|
|
12
12
|
right: "left",
|
|
13
13
|
};
|
|
14
14
|
const Popup = props => {
|
|
15
|
-
const { visible, position = "bottom", children, onClose } = props;
|
|
15
|
+
const { visible, position = "bottom", children, onClose, className } = props;
|
|
16
16
|
const direction = positionMap[position];
|
|
17
17
|
const cls = classNames("xh-popup-content", {
|
|
18
18
|
"xh-popup-content-left": position === "left",
|
|
@@ -45,13 +45,13 @@ const Popup = props => {
|
|
|
45
45
|
onClose && onClose();
|
|
46
46
|
}
|
|
47
47
|
if (process.env.TARO_ENV !== "h5") {
|
|
48
|
-
const minicls = classNames("xh-popup", visible ? "visible" : "hidden");
|
|
48
|
+
const minicls = classNames("xh-popup", className, visible ? "visible" : "hidden");
|
|
49
49
|
return (React.createElement(View, { className: minicls },
|
|
50
50
|
React.createElement(Mask, { onClick: handleClickOnMask }),
|
|
51
51
|
React.createElement(View, { className: cls }, children)));
|
|
52
52
|
}
|
|
53
53
|
return ReactDOM.createPortal(React.createElement(Fade, { in: visible },
|
|
54
|
-
React.createElement("div", { className: "xh-popup" },
|
|
54
|
+
React.createElement("div", { className: classNames("xh-popup", className) },
|
|
55
55
|
React.createElement(Mask, { onClick: handleClickOnMask }),
|
|
56
56
|
React.createElement(Slide, { direction: direction, in: visible },
|
|
57
57
|
React.createElement("div", { className: cls }, children)))), document.body);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Popup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyB,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Popup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyB,SAAS,EAAE,MAAM,OAA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gBACtC,6BAAK,SAAS,EAAE,GAAG,IAAG,QAAQ,CAAO,CAC/B,CACJ,CACD,EACP,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ export declare type PopupPosition = "top" | "bottom" | "left" | "right";
|
|
|
4
4
|
export interface PopupProps extends PropsWithChildren<{}> {
|
|
5
5
|
visible: boolean;
|
|
6
6
|
position?: PopupPosition;
|
|
7
|
+
className?: string;
|
|
7
8
|
onClose?: () => void;
|
|
8
9
|
}
|
|
9
10
|
declare const Popup: FC<PopupProps>;
|