From 7005da7cf76a8b2e4ad204de9ab2cdb1e1883e7f Mon Sep 17 00:00:00 2001 From: Vishwam Talnikar <131583570+visz11@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:37:22 +0530 Subject: [PATCH] Add ChatButton component with chat options --- index.tsx | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 index.tsx diff --git a/index.tsx b/index.tsx new file mode 100644 index 0000000..c1b89d2 --- /dev/null +++ b/index.tsx @@ -0,0 +1,79 @@ +import { + Box, + IconButton, + Image, + Menu, + MenuButton, + MenuItem, + MenuList, + Tooltip, +} from '@chakra-ui/react'; +import { useState } from 'react'; +import { + AiOutlineMail, + AiOutlineMessage, + AiOutlinePhone, +} from 'react-icons/ai'; +import ChatWithUsIcon from '../shared/assets/img/chat-with-us-icon.svg'; + +interface ChatButtonProps { + salesButtonAction: () => void; +} + +export const ChatButton = ({ salesButtonAction }: ChatButtonProps) => { + const [showOptions, setShowOptions] = useState(false); + + const openChat = () => { + if (window?.Intercom) { + window?.Intercom('show'); + } + }; + + const openEmail = () => { + window.open('mailto:support@devdynamics.ai'); + }; + return ( + + + + + setShowOptions(!showOptions)} + icon={} + /> + + + + }> + Chat with us + + } + > + Talk to us + + }> + Email us + + + + + ); +};