/
chat-center
/
server
Обзор
Документация
Войти
/
chat-center
/
server
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
packages/widget/src/components/ChatButton.tsx
40 строк
778 B
levkin_s
Перенес модуль для публикации
04 авг 2026, 17:47
04 авг 2026, 17:47
0ed10dd
Код
Авторство
О чём код?
import { Button } from './Button'; import ChatSVG from '../shared/img/chat.svg'; import CloseSVG from '../shared/img/close.svg'; 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 = <ChatSVG width={30} height={30} />; return ( <Button icon={ minimized || triggered ? openIcon : <CloseSVG width={30} height={30} /> } badge={badge} small onClick={onClick} className={className} data-qa-id="chat-button" > {text} </Button> ); };