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.
@@ -1,4 +1,4 @@
1
-
1
+ @import "../../styles/themes/variable.scss";
2
2
 
3
3
  @font-face {
4
4
  font-family: 'xh-iconfont'; /* Project id 4043926 */
@@ -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
- return (React.createElement("span", Object.assign({ className: iconCls, style: size ? { fontSize: pxTransform(size) } : {} }, rest)));
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;AA8CtB,MAAM,IAAI,GAA0B,KAAK,CAAC,EAAE;IAC1C,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,CAAC,EAAE,SAAS,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAnD,6BAA2C,CAAQ,CAAC;IAE1D,MAAM,OAAO,GAAG,IAAI,IAAI,WAAW,IAAI,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAE1D,OAAO,CACL,4CACE,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAC9C,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,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,6 +1,6 @@
1
1
  {
2
2
  "name": "taro-react-uilib",
3
- "version": "1.3.3",
3
+ "version": "1.3.4-1",
4
4
  "description": "基于taro的跨端组件库",
5
5
  "templateInfo": {
6
6
  "name": "default",
@@ -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;