@local-civics/hub-ui 0.1.60 → 0.1.61

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/index.d.ts CHANGED
@@ -125,6 +125,7 @@ type IconName$1 = typeof iconNames[number];
125
125
  type BadgeButtonProps = {
126
126
  displayName?: string;
127
127
  icon?: IconName$1;
128
+ iconURL?: string;
128
129
  imageURL?: string;
129
130
  startedAt?: string;
130
131
  createdAt?: string;
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ require('external-svg-loader');
4
5
  var LinkifyIt = require('linkify-it');
5
6
  var reactStringReplace = require('react-string-replace');
6
7
 
@@ -3032,7 +3033,8 @@ const BadgeEmblem = (props) => {
3032
3033
  return ["h-max w-32", "w-16 h-16"];
3033
3034
  }
3034
3035
  })();
3035
- return /* @__PURE__ */ React__namespace.createElement("div", { className: `relative overflow-hidden ${size[0]}` }, !props.icon && /* @__PURE__ */ React__namespace.createElement("img", { className: "w-full h-full object-cover", alt: props.alt, src: props.imageURL }), !!props.icon && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
3036
+ const hasIcon = !!props.icon || !!props.iconURL;
3037
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: `relative overflow-hidden ${size[0]}` }, !hasIcon && /* @__PURE__ */ React__namespace.createElement("img", { className: "w-full h-full object-cover", alt: props.alt, src: props.imageURL }), hasIcon && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
3036
3038
  "svg",
3037
3039
  {
3038
3040
  className: "h-full w-full drop-shadow-[inherit]",
@@ -3068,7 +3070,7 @@ const BadgeEmblem = (props) => {
3068
3070
  strokeWidth: "44"
3069
3071
  }
3070
3072
  )
3071
- ), /* @__PURE__ */ React__namespace.createElement("div", { className: `absolute overflow-hidden left-0 right-0 top-0 bottom-0 m-auto text-dark-blue-400 ${size[1]}` }, /* @__PURE__ */ React__namespace.createElement(Icon, { name: props.icon }))));
3073
+ ), /* @__PURE__ */ React__namespace.createElement("div", { className: `absolute overflow-hidden left-0 right-0 top-0 bottom-0 m-auto text-dark-blue-400 ${size[1]}` }, !props.iconURL && !!props.icon && /* @__PURE__ */ React__namespace.createElement(Icon, { name: props.icon }), props.iconURL && /* @__PURE__ */ React__namespace.createElement("svg", { className: "w-full h-full drop-shadow-[inherit]", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React__namespace.createElement("svg", { "data-src": props.iconURL, width: "32", height: "32" })))));
3072
3074
  };
3073
3075
 
3074
3076
  const ordNumber$1 = (n) => {
@@ -3098,6 +3100,7 @@ const BadgeButton = (props) => {
3098
3100
  BadgeEmblem,
3099
3101
  {
3100
3102
  icon: props.icon,
3103
+ iconURL: props.iconURL,
3101
3104
  imageURL: props.imageURL,
3102
3105
  alt: props.displayName,
3103
3106
  level: props.level,