feat(livechat): hide or change logo (#31820)
Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>pull/32060/head
parent
53db2f651d
commit
3eb4dd7f50
@ -0,0 +1,11 @@ |
||||
--- |
||||
"@rocket.chat/meteor": minor |
||||
"@rocket.chat/core-typings": minor |
||||
"@rocket.chat/livechat": minor |
||||
--- |
||||
|
||||
**Added the ability for premium workspaces to hide Rocket.Chat's watermark as well as change the Livechat widget's logo** |
||||
|
||||
The new settings (named below) can be found in the Omnichannel workspace settings within the livechat section. |
||||
- Hide "powered by Rocket.Chat" |
||||
- Livechat widget logo (svg, png, jpg) |
||||
@ -0,0 +1,29 @@ |
||||
import ChatIcon from '../../icons/chat.svg'; |
||||
import CloseIcon from '../../icons/close.svg'; |
||||
import { Button } from '../Button'; |
||||
|
||||
type ChatButtonProps = { |
||||
text: string; |
||||
minimized: boolean; |
||||
badge: number; |
||||
onClick: () => void; |
||||
triggered?: boolean; |
||||
className?: string; |
||||
logoUrl?: string; |
||||
}; |
||||
|
||||
export const ChatButton = ({ text, minimized, badge, onClick, triggered = false, className, logoUrl }: ChatButtonProps) => { |
||||
const openIcon = logoUrl ? <img src={logoUrl} width={30} height={30} alt='Livechat' /> : <ChatIcon />; |
||||
|
||||
return ( |
||||
<Button |
||||
icon={minimized || triggered ? openIcon : <CloseIcon />} |
||||
badge={badge} |
||||
onClick={onClick} |
||||
className={className} |
||||
data-qa-id='chat-button' |
||||
> |
||||
{text} |
||||
</Button> |
||||
); |
||||
}; |
||||
Loading…
Reference in new issue