@open-chat/search-widget
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

@openchat/search-widget

search widget now becomes pacakge.

Pros

  • Can be installed in any react application without the need to be embedded inside html itself.

  • Can be used inside our dashboard's workshop for easy customization.

Cons

  • more boilerplate code needed.

  • more build configurations.

How to use it

1- the embeded version (initilizeChatBot)

export type ColorsType = {
  dark: {
    primary: string;
    accent: string;
    background: string;
    foreground: string;
    backgroundLight: string;
  };
  light: {
    primary: string;
    accent: string;
    background: string;
    foreground: string;
    backgroundLight: string;
  };
};

type OptionsType = {
    colors?: ColorsType | undefined;
    mode?: ModeType | undefined;
    initialFirstMessage?: string | undefined;
    token: string;
}
const options:OptionsType = {
    colors: // optional defaults to the current colors if not provided
    mode: 'light'| "dark" // doesn't do any thing for now
}

initilizeChatBot(options) // call it after the document loaded.

Package Sidebar

Install

npm i @open-chat/search-widget

Weekly Downloads

60

Version

0.3.2

License

UNLICENSED

Unpacked Size

3.79 MB

Total Files

25

Last publish

Collaborators

  • ah7255703