taro-react-uilib 1.3.3 → 1.3.4-1
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 +19 -0
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/components/icon.scss +1 -1
- package/lib/components/Icon/index.js +3 -2
- package/lib/components/Icon/index.js.map +1 -1
- package/package.json +1 -1
- package/types/components/Icon/index.d.ts +3 -1
|
@@ -14,10 +14,11 @@ import classNames from "classnames";
|
|
|
14
14
|
import { pxTransform } from "@/utils";
|
|
15
15
|
import "./index.scss";
|
|
16
16
|
const Icon = props => {
|
|
17
|
-
const { icon = "", size = 0, className } = props, rest = __rest(props, ["icon", "size", "className"]);
|
|
17
|
+
const { icon = "", size = 0, className, color, style } = props, rest = __rest(props, ["icon", "size", "className", "color", "style"]);
|
|
18
18
|
const fixIcon = icon && `xh-icon-${icon}`;
|
|
19
19
|
const iconCls = classNames("xh-icon", fixIcon, className);
|
|
20
|
-
|
|
20
|
+
const finalStyle = Object.assign(Object.assign({}, style), { fontSize: pxTransform(size), color });
|
|
21
|
+
return React.createElement("span", Object.assign({ className: iconCls }, { style: finalStyle }, rest));
|
|
21
22
|
};
|
|
22
23
|
export default Icon;
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,OAAO,cAAc,CAAC;AAqDtB,MAAM,IAAI,GAA0B,KAAK,CAAC,EAAE;IAC1C,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAjE,+CAAyD,CAAQ,CAAC;IAExE,MAAM,OAAO,GAAG,IAAI,IAAI,WAAW,IAAI,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAE1D,MAAM,UAAU,mCACX,KAAK,KACR,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,EAC3B,KAAK,GACN,CAAC;IAEF,OAAO,4CAAM,SAAS,EAAE,OAAO,IAAM,EAAE,KAAK,EAAE,UAAU,EAAE,EAAM,IAAI,EAAI,CAAC;AAC3E,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { StandardLonghandProperties } from "csstype";
|
|
2
3
|
import { XHComponentCommonProps } from "../../types";
|
|
3
4
|
import "./index.scss";
|
|
4
|
-
export declare type XHIcon = "back" | "notice" | "scan" | "light" | "faceScan" | "delete" | "radioFull" | "checkboxFull" | "checkedSquare" | "checked2" | "arrowTop" | "notice2" | "position" | "contacts" | "billFull" | "bill2" | "bill3" | "bill4" | "edit" | "editFull" | "camera" | "close" | "gift" | "message" | "user" | "wenhao" | "kefu" | "user" | "play" | "arrowLeft" | "arrowRight" | "keyboardClose" | "add" | "tongxunlu" | "zhuyi";
|
|
5
|
+
export declare type XHIcon = "prompt" | "score" | "info" | "failure" | "success" | "loading" | "back" | "notice" | "scan" | "light" | "faceScan" | "delete" | "radioFull" | "checkboxFull" | "checkedSquare" | "checked2" | "arrowTop" | "notice2" | "position" | "contacts" | "billFull" | "bill2" | "bill3" | "bill4" | "edit" | "editFull" | "camera" | "close" | "gift" | "message" | "user" | "wenhao" | "kefu" | "user" | "play" | "arrowLeft" | "arrowRight" | "keyboardClose" | "add" | "tongxunlu" | "zhuyi";
|
|
5
6
|
export declare type XHIconProps = {
|
|
6
7
|
icon: XHIcon;
|
|
7
8
|
size?: number;
|
|
9
|
+
color?: StandardLonghandProperties["color"];
|
|
8
10
|
style?: React.CSSProperties;
|
|
9
11
|
onClick?: () => void;
|
|
10
12
|
} & XHComponentCommonProps;
|