From 1f2120c67533f627552cf926e3ff62cf392969bc Mon Sep 17 00:00:00 2001 From: "zhouxinyi@apecloud.com" Date: Thu, 14 Mar 2024 15:22:11 +0800 Subject: [PATCH] feat: chat css --- src/pages/chatInput.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/chatInput.tsx b/src/pages/chatInput.tsx index 5b04adfd2..47d80bf7e 100644 --- a/src/pages/chatInput.tsx +++ b/src/pages/chatInput.tsx @@ -9,8 +9,10 @@ const TypeWriterInput = () => { const [chatReady, setChatReady] = useState(false); const [currentTips, setTips] = useState (''); + + useEffect(() => { - document.getElementsByTagName('kube-chat')[0].logo.style.opacity = 0 + document.getElementsByTagName('kube-chat')[0].style.display= 'none' const chatTips = () => { const tips1 = "how to install kubeblocks".split(/\s/); const tips2 = "how to create a mysql cluster".split(/\s/); @@ -58,6 +60,7 @@ const TypeWriterInput = () => { const handleClick = (event) => { event.preventDefault(); + document.getElementsByTagName('kube-chat')[0].style.display= 'block' document.getElementsByTagName('kube-chat')[0].setBotExpand(true); document.getElementsByTagName('kube-chat')[0].askQuestion(currentTips) }; @@ -77,6 +80,7 @@ const TypeWriterInput = () => { }} onClose={() => { setOpen(false); + document.getElementsByTagName('kube-chat')[0].style.display= 'none' }} onReady={() => { setChatReady(true);