@dust-tt/sparkle 0.2.130 → 0.2.131
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.
|
@@ -17,5 +17,6 @@ export type ModalProps = {
|
|
|
17
17
|
savingLabel?: string;
|
|
18
18
|
title?: string;
|
|
19
19
|
variant?: "full-screen" | "side-sm" | "side-md" | "dialogue";
|
|
20
|
+
className?: string;
|
|
20
21
|
};
|
|
21
|
-
export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, saveLabel, isSaving, savingLabel, title, variant, }: ModalProps): React.JSX.Element;
|
|
22
|
+
export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, saveLabel, isSaving, savingLabel, title, variant, className, }: ModalProps): React.JSX.Element;
|
package/dist/esm/index.js
CHANGED
|
@@ -54989,7 +54989,7 @@ var modalStyles = (_a = {},
|
|
|
54989
54989
|
_a);
|
|
54990
54990
|
var getModalClasses = function (type) { return modalStyles[type] || {}; };
|
|
54991
54991
|
function Modal(_a) {
|
|
54992
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, _b = _a.saveLabel, saveLabel = _b === void 0 ? "Save" : _b, isSaving = _a.isSaving, savingLabel = _a.savingLabel, title = _a.title, _c = _a.variant, variant = _c === void 0 ? "side-sm" : _c;
|
|
54992
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, _b = _a.saveLabel, saveLabel = _b === void 0 ? "Save" : _b, isSaving = _a.isSaving, savingLabel = _a.savingLabel, title = _a.title, _c = _a.variant, variant = _c === void 0 ? "side-sm" : _c, className = _a.className;
|
|
54993
54993
|
var type = variantToType[variant];
|
|
54994
54994
|
if (variant === "dialogue") {
|
|
54995
54995
|
console.warn("Dialogue variant of Modal is deprecated. Please use either another variant of Modal or the Dialog component.");
|
|
@@ -55016,7 +55016,7 @@ function Modal(_a) {
|
|
|
55016
55016
|
React__default.createElement(tt.Child, { as: Fragment, enter: "s-ease-out s-duration-300", enterFrom: transitionEnterFrom, enterTo: transitionEnterTo, leave: "s-ease-in s-duration-200", leaveFrom: transitionLeaveFrom, leaveTo: transitionLeaveTo },
|
|
55017
55017
|
React__default.createElement(_t.Panel, { className: classNames("s-absolute s-transform s-bg-structure-0 s-px-3 s-transition-all sm:s-px-4", panelClasses, variantSize[variant]) },
|
|
55018
55018
|
React__default.createElement(BarHeader, { title: title || "", leftActions: action ? React__default.createElement(Button, __assign({}, action)) : undefined, rightActions: React__default.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
|
|
55019
|
-
React__default.createElement("div", { className: classNames("s-pb-6 s-pt-16", innerContainerClasses) }, children)))))));
|
|
55019
|
+
React__default.createElement("div", { className: classNames("s-pb-6 s-pt-16", innerContainerClasses, className !== null && className !== void 0 ? className : "") }, children)))))));
|
|
55020
55020
|
}
|
|
55021
55021
|
|
|
55022
55022
|
var reactConfetti_min = {exports: {}};
|