@kaifusion/widget 1.0.2 → 1.0.4
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/README.md +10 -8
- package/dist/KaiChatWidget.d.ts +2 -1
- package/dist/index.es.js +1530 -1529
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/KaiChatWidget.tsx +4 -2
package/package.json
CHANGED
package/src/KaiChatWidget.tsx
CHANGED
|
@@ -40,6 +40,7 @@ export interface KaiChatWidgetProps {
|
|
|
40
40
|
targetUrl: string;
|
|
41
41
|
position?: "left" | "right";
|
|
42
42
|
color?: string;
|
|
43
|
+
icon?: React.ReactNode;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
export default function KaiChatWidget({
|
|
@@ -49,6 +50,7 @@ export default function KaiChatWidget({
|
|
|
49
50
|
targetUrl,
|
|
50
51
|
position = "right",
|
|
51
52
|
color = "#526cfe",
|
|
53
|
+
icon,
|
|
52
54
|
}: KaiChatWidgetProps) {
|
|
53
55
|
const [isOpen, setIsOpen] = useState(false);
|
|
54
56
|
const [isMaximized, setIsMaximized] = useState(false);
|
|
@@ -701,9 +703,9 @@ export default function KaiChatWidget({
|
|
|
701
703
|
{isOpen ? (
|
|
702
704
|
<X className="w-7 h-7" />
|
|
703
705
|
) : (
|
|
704
|
-
<MessageSquare className="w-7 h-7" />
|
|
706
|
+
icon || <MessageSquare className="w-7 h-7" />
|
|
705
707
|
)}
|
|
706
708
|
</motion.button>
|
|
707
709
|
</div>
|
|
708
710
|
);
|
|
709
|
-
}
|
|
711
|
+
}
|