@dust-tt/sparkle 0.2.74 → 0.2.75-rc
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/dist/cjs/components/Notification.d.ts +4 -4
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Notification.d.ts +4 -4
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface NotificationProps {
|
|
3
3
|
className?: string;
|
|
4
|
-
description
|
|
5
|
-
title
|
|
6
|
-
|
|
4
|
+
description?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
variant: "success" | "error";
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
}
|
|
9
|
-
export declare function Notification({ description, title,
|
|
9
|
+
export declare function Notification({ description, title, variant, onClick, className, }: NotificationProps): React.JSX.Element;
|
package/dist/cjs/index.js
CHANGED
|
@@ -32414,12 +32414,12 @@ function Banner(props) {
|
|
|
32414
32414
|
}
|
|
32415
32415
|
|
|
32416
32416
|
function Notification(_a) {
|
|
32417
|
-
var description = _a.description, title = _a.title,
|
|
32417
|
+
var description = _a.description, title = _a.title, variant = _a.variant, onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
32418
32418
|
return (React.createElement("div", { className: classNames("s-pointer-events-auto s-relative s-flex s-max-w-[260px] s-items-start s-gap-2 s-rounded-xl s-border s-border-structure-100 s-bg-structure-0 s-pb-5 s-pl-4 s-pr-8 s-pt-4 s-shadow-xl", className) },
|
|
32419
|
-
|
|
32419
|
+
variant === "success" ? (React.createElement(Icon, { size: "md", visual: SvgCheckCircle$1, className: "s-pt-0.5 s-text-success-500" })) : (React.createElement(Icon, { size: "md", visual: SvgXCircle$1, className: "s-pt-0.5 s-text-warning-500" })),
|
|
32420
32420
|
React.createElement("div", { className: "s-flex s-flex-col s-gap-1" },
|
|
32421
|
-
React.createElement("div", { className: classNames("s-text-md s-font-semibold",
|
|
32422
|
-
React.createElement("div", { className: "s-text-sm s-font-normal s-text-element-700" }, description)),
|
|
32421
|
+
React.createElement("div", { className: classNames("s-text-md s-font-semibold", variant === "success" ? "s-text-success-500" : "s-text-warning-500") }, title || variant),
|
|
32422
|
+
description && (React.createElement("div", { className: "s-text-sm s-font-normal s-text-element-700" }, description))),
|
|
32423
32423
|
React.createElement("div", { className: "s-absolute s-right-2 s-top-2" },
|
|
32424
32424
|
React.createElement(IconButton, { className: "s-pt-0.5", icon: SvgXMark$1, size: "sm", variant: "secondary", onClick: onClick }))));
|
|
32425
32425
|
}
|