0.4.6 • Published 5 years ago

tamm-bot v0.4.6

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

TAMM BOT UI COMPONENT

This project is the UI Extra Customisation for TAMM BOT that relies on the Microsoft's Bot Framework Web Chat version 4.5.3

Technologies used:

An Example on how to call the component

    export const App = () => {

        const [loaded, setLoaded] = useState(false);
        const [minimized, setMinimized] = useState(true);

        const handleMaximizeButtonClick = useCallback(async () => {
            setLoaded(true);
            setMinimized(false);
        }, [setMinimized]);

        const handleMinimizeButtonClick = useCallback(() => {
            setMinimized(true);
        }, [setMinimized]);

        const chatLocale = "ar-AE"; //will be coming from the route using react-router-dom
        // Please note that react-router-dom is not a dependency for this package

        return (

        <div className="minimizable-web-chat">
            <button
            className={classNames(
            "maximize",
            "/en/" === "/en/" ? "chatButtonEn" : "chatButtonAr",
            )}
            onClick={
            minimized ? handleMaximizeButtonClick : handleMinimizeButtonClick
            } >
        <img src={ChatButton} alt="minimize-window" />
        </button>

        {loaded && (
          <BotComponent
            minimized={minimized}
            minimizeFunction={handleMinimizeButtonClick}
            chatLocale={chatLocale}
            apiRoute="----"
            tokenRoute="----"
            secretKey="----"
            isMobile={false}
          />
        )}

    </div>
0.4.6

5 years ago

0.4.5

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.2.9

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.3

5 years ago

0.2.7

5 years ago

0.2.8

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago