videorepute-chat-interview
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

Live Demo

🔗 gh pages

videorepute-chat-interview

A simple and efficient npm package for integrating a chatbot into your application, designed specifically for VideoRepute interview preparation.

Prerequisites

Before installing this package, please ensure that you have React version 18.2 or higher installed in your project.

Installation

You can install this package via npm:

npm install videorepute-chat-interview

Usage

import { Chat } from "videorepute-chat-interview";
import logo from "./assets/images/logo.svg";

function App() {
  // Define functions to save and clear messages in local storage
  const saveMessage = (messages: messageType[]) => {
    localStorage.setItem("dataMessage", JSON.stringify(messages));
  };

  const clearMessage = () => {
    localStorage.removeItem("dataMessage");
  };

  return (
    <Chat
      greetingMessage="Hello! Welcome to the interview chatbot."
      logo={logo}
      clear={clearMessage}
      onChange={saveMessage}
      dir="rtl"
    />
  );
}

export default App;

Props

  • greetingMessage: The initial message displayed by the chatbot.
  • image displayed in the chatbot.
  • clear: Function to clear messages from local storage.
  • onChange: Function called when messages are updated.
  • dir: Text direction (rtl or ltr).

Readme

Keywords

Package Sidebar

Install

npm i videorepute-chat-interview

Weekly Downloads

1

Version

1.0.14

License

ISC

Unpacked Size

24.7 kB

Total Files

12

Last publish

Collaborators

  • reza-zare