Skip to content

Instantly share code, notes, and snippets.

@witnessmenow
Created May 5, 2016 13:06
Show Gist options
  • Save witnessmenow/f5829ffff375a982a7d3dc18924676c2 to your computer and use it in GitHub Desktop.
Save witnessmenow/f5829ffff375a982a7d3dc18924676c2 to your computer and use it in GitHub Desktop.
Example of using chat-template.js
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>react-webpack-wrapper-example</title>
<script src="/builds/chat-template.js" type="text/javascript"></script>
<script>
var messages = [
{
message: 'Hey how are you keeping?',
inbound: true,
backColor: 'white',
duration: 1500,
}
];
function initialise(){
showChatTemplate(messages, document.getElementById("content"));
}
</script>
</head>
<body onload="initialise()">
<h1>react-webpack-wrapper-example</h1>
<div style="max-width: 600px" id="content" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment