I am new to react js and i want to call chatbot using directline token. I have the code given below. My need is to call the chatbot when the button is clicked and must get minimzed. I don't know how to do that and this appears to be a simple question. Help me in resolving it. Thanks in advance.
import React from "react";
import { DirectLine } from 'botframework-directlinejs';
import ReactWebChat from 'botframework-webchat';
import "./Login.css";
export default class extends React.Component {
constructor(props) {
super(props);
this.directLine=new DirectLine({ token: '' });
}
Chat = ()=> {
<ReactWebChat directLine={ this.directLine } />
}
render(){
return (
<div className="image">
<img src={require('../src/Images/banner.jpg')} ></img>
<form>
<div className="ChatBot" > <button onClick={this.Chat} >Click</button>
</div>
</form>
</div>
);
}
}
and i need to customize the style of chat bot framework. How can i implement it. The above code maybe not right. Kindly help me in figuring it out.