react-driftjs
Version:
React component implementation of Drift Chatbot Widget
20 lines (17 loc) • 508 B
TypeScript
import React from "react";
export interface DriftProps {
appId: string;
userId?: string;
attributes?: { [name: string]: any };
eventHandlers?: { event: string; function: () => void }[];
style?: { [name: string]: any };
}
export default class Drift extends React.Component {
props: DriftProps;
insertScript: (scriptText: string) => void;
addMainScript: () => void;
addAttributes: () => void;
addEventHandlers: () => void;
createStyleString: () => void;
addCustomStyle: () => void;
}