@algorithm-shift/design-system 1.2.13 → 1.2.14

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.js CHANGED
@@ -191,34 +191,16 @@ var ImageControl = ({
191
191
  }) => {
192
192
  const imageClass = cn(
193
193
  "h-[200px] w-[200px] border-1",
194
- "border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition",
195
- className
194
+ "border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition"
196
195
  );
197
196
  const defaultImgClass = cn(
198
197
  "w-full h-full",
199
198
  className
200
199
  );
201
- let src;
202
- let extraProps;
203
- if (imageUrlExternal) {
204
- src = imageUrlExternal;
205
- extraProps = {
206
- className: defaultImgClass
207
- };
208
- } else if (imageUrl) {
209
- src = imageUrl;
210
- extraProps = {
211
- className: defaultImgClass
212
- };
213
- } else {
214
- src = "./image-placeholder.png";
215
- extraProps = {
216
- width: 50,
217
- height: 50,
218
- className: "opacity-50"
219
- };
200
+ if (!imageUrl && !imageUrlExternal) {
201
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: "./image-placeholder.png", alt: altText, className: "opacity-50", width: 50, height: 50 }) });
220
202
  }
221
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src, alt: altText, ...extraProps }) });
203
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: imageUrlExternal || imageUrl, alt: altText, className: defaultImgClass, style });
222
204
  };
223
205
  var Image_default = ImageControl;
224
206