@megha-ui/react 1.2.248 → 1.2.250
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.
|
@@ -394,7 +394,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
394
394
|
width: "100%",
|
|
395
395
|
}, children: [option.icon &&
|
|
396
396
|
option.isDelete &&
|
|
397
|
-
!option.isDelete && (_jsx("span", {
|
|
397
|
+
!option.isDelete && (_jsx("span", { children: option.icon })), _jsx("span", { style: { margin: "0 0.5rem" }, children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
|
|
398
398
|
})] }, gIndex)))) : (filteredOptions.map((option, index) => (_jsxs("li", { ref: (el) => {
|
|
399
399
|
optionRefs.current[index] = el;
|
|
400
400
|
}, onClick: (e) => onSelectChange
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState, useRef } from "react";
|
|
3
3
|
import { MdClose } from "react-icons/md";
|
|
4
|
-
const Modal = ({ isOpen, onClose, title, subTitle, titleAlign = "left", children, footer, className = "", width, minHeight = 300, padding = "1rem", borderRadius = 6, backgroundColor = "var(--modal-bg)", paddingBottom = "1rem", paddingLeft = "1rem", paddingRight = "1rem", paddingTop = "1rem", contentHeight = "calc(100vh - 180)", overlayClose = false, alignItems, justifyContent, modalContentClass, bodyOverflow = "auto", }) => {
|
|
4
|
+
const Modal = ({ isOpen, onClose, title, subTitle, titleAlign = "left", children, footer, className = "", width, minHeight = 300, padding = "1rem", borderRadius = 6, backgroundColor = "var(--modal-bg)", paddingBottom = "1rem", paddingLeft = "1rem", paddingRight = "1rem", paddingTop = "1rem", contentHeight = "calc(100vh - 180)", overlayClose = false, alignItems, justifyContent, modalContentClass, modalBodyClass, bodyOverflow = "auto", }) => {
|
|
5
5
|
const [removelHeight, setRemovalHeight] = useState(0);
|
|
6
6
|
const footerRef = useRef(null);
|
|
7
7
|
useEffect(() => {
|
|
@@ -55,7 +55,7 @@ const Modal = ({ isOpen, onClose, title, subTitle, titleAlign = "left", children
|
|
|
55
55
|
justifyContent,
|
|
56
56
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
57
57
|
zIndex: 1050,
|
|
58
|
-
}, onClick: () => overlayClose && onClose(), children: _jsxs("div", { style: modalContentStyle, className: modalContentClass
|
|
58
|
+
}, onClick: () => overlayClose && onClose(), children: _jsxs("div", { style: modalContentStyle, className: `${modalContentClass} flex flex-col`, onClick: (e) => e.stopPropagation(), children: [title && (_jsxs("div", { style: {
|
|
59
59
|
position: "relative",
|
|
60
60
|
marginBottom: 0,
|
|
61
61
|
padding: "1rem",
|
|
@@ -70,9 +70,8 @@ const Modal = ({ isOpen, onClose, title, subTitle, titleAlign = "left", children
|
|
|
70
70
|
alignItems: "center",
|
|
71
71
|
justifyContent: "center",
|
|
72
72
|
padding: 4,
|
|
73
|
-
}, onClick: onClose, children: _jsx(MdClose, { size: 18 }) })] })), _jsx("div", { style: {
|
|
73
|
+
}, onClick: onClose, children: _jsx(MdClose, { size: 18 }) })] })), _jsx("div", { className: `${modalBodyClass} flex-grow`, style: {
|
|
74
74
|
overflowY: bodyOverflow,
|
|
75
|
-
height: `calc(${contentHeight} - ${removelHeight}px)`,
|
|
76
75
|
paddingLeft: "1rem",
|
|
77
76
|
paddingRight: "1rem",
|
|
78
77
|
}, children: children }), footer && (_jsx("div", { ref: footerRef, style: { marginTop: "auto", padding: "1rem" }, children: footer }))] }) }));
|
package/package.json
CHANGED