@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 +4 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -124,34 +124,16 @@ var ImageControl = ({
|
|
|
124
124
|
}) => {
|
|
125
125
|
const imageClass = cn(
|
|
126
126
|
"h-[200px] w-[200px] border-1",
|
|
127
|
-
"border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition"
|
|
128
|
-
className
|
|
127
|
+
"border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition"
|
|
129
128
|
);
|
|
130
129
|
const defaultImgClass = cn(
|
|
131
130
|
"w-full h-full",
|
|
132
131
|
className
|
|
133
132
|
);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (imageUrlExternal) {
|
|
137
|
-
src = imageUrlExternal;
|
|
138
|
-
extraProps = {
|
|
139
|
-
className: defaultImgClass
|
|
140
|
-
};
|
|
141
|
-
} else if (imageUrl) {
|
|
142
|
-
src = imageUrl;
|
|
143
|
-
extraProps = {
|
|
144
|
-
className: defaultImgClass
|
|
145
|
-
};
|
|
146
|
-
} else {
|
|
147
|
-
src = "./image-placeholder.png";
|
|
148
|
-
extraProps = {
|
|
149
|
-
width: 50,
|
|
150
|
-
height: 50,
|
|
151
|
-
className: "opacity-50"
|
|
152
|
-
};
|
|
133
|
+
if (!imageUrl && !imageUrlExternal) {
|
|
134
|
+
/* @__PURE__ */ jsx5("div", { className: imageClass, children: /* @__PURE__ */ jsx5("img", { src: "./image-placeholder.png", alt: altText, className: "opacity-50", width: 50, height: 50 }) });
|
|
153
135
|
}
|
|
154
|
-
return /* @__PURE__ */ jsx5("
|
|
136
|
+
return /* @__PURE__ */ jsx5("img", { src: imageUrlExternal || imageUrl, alt: altText, className: defaultImgClass, style });
|
|
155
137
|
};
|
|
156
138
|
var Image_default = ImageControl;
|
|
157
139
|
|