To try the example, run:
Create a React Object from LIT web-component:
import {createComponent} from '@lit/react';
import React from 'react';
import CLABSChat from '@carbon-labs/ai-chat/es/components/chat/chat.js';
export const Chat = createComponent({
tagName: 'clabs-chat',
elementClass: CLABSChat,
react: React,
events: {
},
});
Then import it with:
import './App.css';
import {Chat} from './ChatComponent';
import conversationExample from './sampleConversation.json';
function App() {
return (
<div className="App">
<div className="Container">
<Chat conversation={conversationExample}>
</Chat>
</div>
</div>
);
}
export default App;