This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
tony f4d67450f0 Added contact button that calls the VideoAsk
widget and opens the chat window.
2023-04-20 10:31:32 -07:00

19 lines
549 B
JavaScript

const ContactButton = ({buttonText}) => {
const openChatScreen = () => {
const chatButton = document.getElementsByClassName('videoask-embed__button--SgLKO')[0];
if (chatButton) {
chatButton.click();
}
};
return (
<button
className="px-20 mt-8 mx-5 py-2 text-white border border-blue-500 rounded hover:border-white transition duration-300 ease-in-out focus:outline-none"
onClick={openChatScreen}
>
{buttonText}
</button>
);
};
export default ContactButton;