@minutemailer/kit 1.2.2 → 1.2.3
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/components/image-slot.js +3 -4
- package/package.json +1 -1
package/components/image-slot.js
CHANGED
|
@@ -98,10 +98,9 @@ function ImageSlot({ src, s3, alt = '', width, height, actions = [], onAction, o
|
|
|
98
98
|
}
|
|
99
99
|
// Placeholder view
|
|
100
100
|
return (_jsx("div", { "data-slot": "image-slot", className: cn('bg-muted flex items-center justify-center @container transition-colors', dragState === 'over' && 'bg-green-100 dark:bg-green-950', className), style: {
|
|
101
|
-
width:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
height: width / aspectRatio,
|
|
101
|
+
width: '100%',
|
|
102
|
+
maxWidth: width,
|
|
103
|
+
aspectRatio: `${width} / ${height}`,
|
|
105
104
|
...style,
|
|
106
105
|
}, onDragEnter: handleDragEnter, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: loading ? (_jsx(Spinner, { className: "size-8" })) : dragState === 'over' ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "Drop image to upload" })) : (_jsxs(_Fragment, { children: [_jsx("input", { ref: fileInputRef, type: "file", accept: accept.join(','), onChange: handleFileInputChange, className: "hidden" }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", children: [_jsx(ImageIcon, { className: "@xs:hidden" }), _jsx("span", { className: "hidden @xs:inline", children: "Add image" }), _jsx(ChevronDownIcon, { className: "hidden @xs:inline" })] }) }), _jsx(DropdownMenuContent, { children: actions.map((action) => (_jsxs(DropdownMenuItem, { onClick: () => handleActionClick(action), children: [action.icon, action.name] }, action.value))) })] })] })) }));
|
|
107
106
|
}
|