Last active
August 18, 2023 07:34
-
-
Save FredrikOseberg/7fad0e5c1458559c544de6f0dd41e602 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in config | |
... | |
import Overview from "../components/widgets/Overview/Overview"; | |
import MessageParser from "../components/widgets/MessageParser/MessageParser"; | |
import ActionProviderDocs from "../components/widgets/ActionProvider/ActionProviderDocs"; | |
const config = { | |
..., | |
state: { | |
gist: "", | |
}, | |
widgets: [ | |
{ | |
widgetName: "overview", | |
widgetFunc: (props) => <Overview {...props} />, | |
mapStateToProps: ["gist"], | |
props: {} | |
}, | |
{ | |
widgetName: "messageParser", | |
widgetFunc: (props) => <MessageParser {...props} />, | |
mapStateToProps: ["gist"], | |
props: {} | |
}, | |
{ | |
widgetName: "actionProviderDocs", | |
widgetFunc: (props) => <ActionProviderDocs {...props} />, | |
mapStateToProps: ["gist"], | |
props: {} | |
}, | |
], | |
}; | |
export default config; | |
// Use the widget in actionProvider | |
this.createChatBotMessage("Hi", { widget: "overview" }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to show date before every message and add props to widget?