@discuss-ds/ui 0.9.0 → 0.9.1
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -586,7 +586,7 @@ interface MediaInfoProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
586
586
|
}
|
|
587
587
|
declare function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }: MediaInfoProps): React.JSX.Element;
|
|
588
588
|
interface ImagePreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
589
|
-
/** The image (an `<img>`
|
|
589
|
+
/** The image (an `<img>`). The preview area is as tall as the image at full width, up to 336px. Leave empty for the fixed-height placeholder fill. */
|
|
590
590
|
children?: React.ReactNode;
|
|
591
591
|
name: string;
|
|
592
592
|
details?: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -586,7 +586,7 @@ interface MediaInfoProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
586
586
|
}
|
|
587
587
|
declare function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }: MediaInfoProps): React.JSX.Element;
|
|
588
588
|
interface ImagePreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
589
|
-
/** The image (an `<img>`
|
|
589
|
+
/** The image (an `<img>`). The preview area is as tall as the image at full width, up to 336px. Leave empty for the fixed-height placeholder fill. */
|
|
590
590
|
children?: React.ReactNode;
|
|
591
591
|
name: string;
|
|
592
592
|
details?: string[];
|
package/dist/index.js
CHANGED
|
@@ -2249,7 +2249,17 @@ function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...
|
|
|
2249
2249
|
}
|
|
2250
2250
|
var ImagePreview = React37.forwardRef(
|
|
2251
2251
|
({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ jsxs27("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
|
|
2252
|
-
/* @__PURE__ */ jsx38(
|
|
2252
|
+
/* @__PURE__ */ jsx38(
|
|
2253
|
+
"div",
|
|
2254
|
+
{
|
|
2255
|
+
className: cn(
|
|
2256
|
+
"flex w-full items-center justify-center bg-accent-soft",
|
|
2257
|
+
// With an image the area hugs it (full width, its own height, at most 336px tall); the empty placeholder keeps the fixed height.
|
|
2258
|
+
children ? "[&>img]:block [&>img]:h-auto [&>img]:max-h-84 [&>img]:w-full [&>img]:object-contain" : "h-84"
|
|
2259
|
+
),
|
|
2260
|
+
children
|
|
2261
|
+
}
|
|
2262
|
+
),
|
|
2253
2263
|
/* @__PURE__ */ jsx38(MediaInfo, { name, details, onRemove, large: true })
|
|
2254
2264
|
] })
|
|
2255
2265
|
);
|