@dust-tt/sparkle 0.1.91 → 0.1.92
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.
|
@@ -10,5 +10,5 @@ interface ModalProps {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
isFullScreen?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function Modal({ isOpen, onClose, children, hasChanged, onSave, title, isFullScreen, }: ModalProps): React.JSX.Element;
|
|
13
|
+
export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, title, isFullScreen, }: ModalProps): React.JSX.Element;
|
|
14
14
|
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -32769,7 +32769,7 @@ function IconToggleButton(_a) {
|
|
|
32769
32769
|
}
|
|
32770
32770
|
|
|
32771
32771
|
function Modal(_a) {
|
|
32772
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, title = _a.title, _b = _a.isFullScreen, isFullScreen = _b === void 0 ? false : _b;
|
|
32772
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, title = _a.title, _b = _a.isFullScreen, isFullScreen = _b === void 0 ? false : _b;
|
|
32773
32773
|
var buttonBarProps = hasChanged
|
|
32774
32774
|
? {
|
|
32775
32775
|
variant: "validate",
|
|
@@ -32790,7 +32790,7 @@ function Modal(_a) {
|
|
|
32790
32790
|
React.createElement(_t.Panel, { className: classNames("s-relative s-transform s-overflow-hidden s-bg-white s-px-4 s-transition-all sm:s-px-6", isFullScreen
|
|
32791
32791
|
? "s-m-0 s-h-full s-max-h-full s-w-full s-max-w-full"
|
|
32792
32792
|
: "s-max-w-2xl s-rounded-lg s-shadow-xl lg:s-w-1/2") },
|
|
32793
|
-
React.createElement(BarHeader, { title: title || "", rightActions: React.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
|
|
32793
|
+
React.createElement(BarHeader, { title: title || "", leftActions: action ? React.createElement(Button, __assign({}, action)) : undefined, rightActions: React.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
|
|
32794
32794
|
React.createElement("div", { className: "s-pb-6 s-pt-14 ".concat(isFullScreen ? "s-h-full s-overflow-y-auto" : "") }, children))))))));
|
|
32795
32795
|
}
|
|
32796
32796
|
|