@sb1/ffe-icons-react 10.0.3 → 10.0.5

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/es/Icon.js CHANGED
@@ -23,9 +23,6 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import React from 'react';
24
24
  import classNames from 'classnames';
25
25
  export var Icon = function (_a) {
26
- var fileUrl = _a.fileUrl, className = _a.className, ariaLabel = _a.ariaLabel, _b = _a.size, size = _b === void 0 ? 'md' : _b, rest = __rest(_a, ["fileUrl", "className", "ariaLabel", "size"]);
27
- return (React.createElement("span", __assign({ role: "img", "aria-label": ariaLabel, "aria-hidden": !ariaLabel, className: classNames('ffe-icons', "ffe-icons--".concat(size), className), style: {
28
- maskImage: "url(".concat(fileUrl, ")"),
29
- WebkitMaskImage: "url(".concat(fileUrl, ")"),
30
- } }, rest)));
26
+ var fileUrl = _a.fileUrl, className = _a.className, ariaLabel = _a.ariaLabel, _b = _a.size, size = _b === void 0 ? 'md' : _b, style = _a.style, rest = __rest(_a, ["fileUrl", "className", "ariaLabel", "size", "style"]);
27
+ return (React.createElement("span", __assign({ role: "img", "aria-label": ariaLabel, "aria-hidden": !ariaLabel, className: classNames('ffe-icons', "ffe-icons--".concat(size), className), style: __assign({ maskImage: "url(".concat(fileUrl, ")"), WebkitMaskImage: "url(".concat(fileUrl, ")") }, style) }, rest)));
31
28
  };
package/lib/Icon.js CHANGED
@@ -29,10 +29,7 @@ exports.Icon = void 0;
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var classnames_1 = __importDefault(require("classnames"));
31
31
  var Icon = function (_a) {
32
- var fileUrl = _a.fileUrl, className = _a.className, ariaLabel = _a.ariaLabel, _b = _a.size, size = _b === void 0 ? 'md' : _b, rest = __rest(_a, ["fileUrl", "className", "ariaLabel", "size"]);
33
- return (react_1.default.createElement("span", __assign({ role: "img", "aria-label": ariaLabel, "aria-hidden": !ariaLabel, className: (0, classnames_1.default)('ffe-icons', "ffe-icons--".concat(size), className), style: {
34
- maskImage: "url(".concat(fileUrl, ")"),
35
- WebkitMaskImage: "url(".concat(fileUrl, ")"),
36
- } }, rest)));
32
+ var fileUrl = _a.fileUrl, className = _a.className, ariaLabel = _a.ariaLabel, _b = _a.size, size = _b === void 0 ? 'md' : _b, style = _a.style, rest = __rest(_a, ["fileUrl", "className", "ariaLabel", "size", "style"]);
33
+ return (react_1.default.createElement("span", __assign({ role: "img", "aria-label": ariaLabel, "aria-hidden": !ariaLabel, className: (0, classnames_1.default)('ffe-icons', "ffe-icons--".concat(size), className), style: __assign({ maskImage: "url(".concat(fileUrl, ")"), WebkitMaskImage: "url(".concat(fileUrl, ")") }, style) }, rest)));
37
34
  };
38
35
  exports.Icon = Icon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-icons-react",
3
- "version": "10.0.3",
3
+ "version": "10.0.5",
4
4
  "description": "React-komponenter for ffe-icons",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -30,7 +30,7 @@
30
30
  "@sb1/ffe-icons": "^14.0.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@sb1/ffe-buildtool": "^0.6.3",
33
+ "@sb1/ffe-buildtool": "^0.6.4",
34
34
  "eslint": "^8.57.0",
35
35
  "react": "^16.9.0",
36
36
  "react-dom": "^16.9.0",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "f9439b117955babfcd2ea4389d38618679598e2d"
45
+ "gitHead": "1a06e8ffb30f92e91b7825ccebada746d7f60abc"
46
46
  }
package/src/Icon.tsx CHANGED
@@ -17,6 +17,7 @@ export const Icon: React.FC<IconProps> = ({
17
17
  className,
18
18
  ariaLabel,
19
19
  size = 'md',
20
+ style,
20
21
  ...rest
21
22
  }) => {
22
23
  return (
@@ -28,6 +29,7 @@ export const Icon: React.FC<IconProps> = ({
28
29
  style={{
29
30
  maskImage: `url(${fileUrl})`,
30
31
  WebkitMaskImage: `url(${fileUrl})`,
32
+ ...style,
31
33
  }}
32
34
  {...rest}
33
35
  />