1.2.1 • Published 8 months ago

@shop25/conversations v1.2.1

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago
import { createWidget } from "@shop25/conversations";

  const app = document.querySelector("#app");

  if (!app) {
    return;
  }

  const { client, destroy } = createWidget({
    host: "https://conversations.s25.dev",
    mountElement: app as HTMLElement,
    orderName: "YP23648-1",
    projectSlug: "yoshiparts.com",
  });

  client.on("mounted", () => console.log("mounted"));
  client.on("customerSelected", (customerId) => console.log(customerId));
  client.on("orderSelected", (orderName) => console.log(orderName));

  setTimeout(() => {
    client.emit("orderSelected", "YP23648-1");
  }, 2000);


  destroy()
1.2.0

8 months ago

1.2.1

8 months ago

1.1.0

1 year ago

1.0.0

1 year ago