@dynamic-labs/iconic 0.1.24 → 0.1.26

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/iconic",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "A library of icons used by Dynamic Lab's SDK, served via CDN",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -63,5 +63,8 @@
63
63
  "dist",
64
64
  "README.md",
65
65
  "LICENSE"
66
- ]
66
+ ],
67
+ "dependencies": {
68
+ "@dynamic-labs/logger": "^0.17.31"
69
+ }
67
70
  }
@@ -13,10 +13,10 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.SocialIcon = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
- const getSocialIcon_1 = require("./getSocialIcon");
16
+ const findSocialIcon_1 = require("./findSocialIcon");
17
17
  const SocialIcon = (_a) => {
18
18
  var { name, variant } = _a, props = __rest(_a, ["name", "variant"]);
19
- const Icon = (0, getSocialIcon_1.getSocialIcon)(name, variant);
19
+ const Icon = (0, findSocialIcon_1.findSocialIcon)(name, variant);
20
20
  if (!Icon)
21
21
  return null;
22
22
  return (0, jsx_runtime_1.jsx)(Icon, Object.assign({}, props));
@@ -0,0 +1,3 @@
1
+ import type { ThemeVariant } from '../types';
2
+ import type { Iconic } from '../Iconic';
3
+ export declare const findSocialIcon: (name: string, variant?: ThemeVariant) => Iconic | null;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findSocialIcon = void 0;
4
+ const getSocialIcon_1 = require("./getSocialIcon");
5
+ const logger_1 = require("../logger");
6
+ const findSocialIcon = (name, variant = 'light') => {
7
+ try {
8
+ return (0, getSocialIcon_1.getSocialIcon)(name, variant);
9
+ }
10
+ catch (e) {
11
+ logger_1.logger.error(e);
12
+ return null;
13
+ }
14
+ };
15
+ exports.findSocialIcon = findSocialIcon;
@@ -1,2 +1,3 @@
1
1
  export * from './SocialIcon';
2
2
  export * from './getSocialIcon';
3
+ export * from './findSocialIcon';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./SocialIcon"), exports);
18
18
  __exportStar(require("./getSocialIcon"), exports);
19
+ __exportStar(require("./findSocialIcon"), exports);
@@ -0,0 +1,2 @@
1
+ import { Logger } from '@dynamic-labs/logger';
2
+ export declare const logger: Logger;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logger = void 0;
4
+ const logger_1 = require("@dynamic-labs/logger");
5
+ exports.logger = new logger_1.Logger('Dynamic Ionic', logger_1.LogLevel.INFO);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/iconic",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "A library of icons used by Dynamic Lab's SDK, served via CDN",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -63,5 +63,8 @@
63
63
  "dist",
64
64
  "README.md",
65
65
  "LICENSE"
66
- ]
66
+ ],
67
+ "dependencies": {
68
+ "@dynamic-labs/logger": "^0.17.31"
69
+ }
67
70
  }