import React, { useState } from 'react';

const FAButton = () => {
    const [isOpen, setIsOpen] = useState(false);

    const toggleOptions = () => {
        setIsOpen(!isOpen);
    };

    return (  
        <div className="fixed bottom-5 right-10 z-50">  
            <button onClick={toggleOptions}>  
                <img src="../public/image/btn-whatsapp.png" />  
            </button>  
            {isOpen && (  
                <div className="absolute bottom-16 right-0 flex flex-col space-y-2 mb-4 mt-2">
                    <button className="flex items-center justify-center">
                    <img src="../public/image/btn-whatsapp.png" alt="whatsapp" />
                    </button>  
                    <button className="flex items-center justify-center">
                    <img src="../public/image/telegram.png" alt="telegram" />
                    </button>  
                </div>  
            )}  
        </div>  
    );
};

export default FAButton;