Last active
February 20, 2019 09:44
-
-
Save sashadev-sky/e24e6c7adadd52d017cae5ad6cc94a58 to your computer and use it in GitHub Desktop.
Node script to wrap a React component
This file contains hidden or 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
import { Conversation } from 'chat-template'; | |
import ReactDOM from 'react-dom'; | |
import React from 'react'; | |
const showChatTemplate = (messages, element, delay = 1, height = 300) => { | |
ReactDOM.render(<Conversation delay={delay} height={height} messages={messages} />, | |
element); | |
}; | |
module.exports = showChatTemplate; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment