public createOverlayToggle()

in libs/overlay/src/lib/ChatOverlayManager.ts [228:253]


  public createOverlayToggle(
    position: Position,
    options: ChatOverlayManagerOptions,
  ): HTMLButtonElement {
    const button = document.createElement('button');

    setStyles(button, {
      backgroundColor:
        options?.iconBgColor || overlayToggleIconOptions.iconBgColor,
      borderRadius: '100%',
      border: 'none',
      height: `${options?.iconHeight || overlayToggleIconOptions.iconHeight}px`,
      width: `${options?.iconWidth || overlayToggleIconOptions.iconWidth}px`,
      color: options.iconColor || overlayToggleIconOptions.iconColor,
      cursor: 'pointer',
      position: 'fixed',
      top: position.top,
      bottom: position.bottom,
      left: position.left,
      right: position.right,
    });

    button.innerHTML = options?.iconSvg || overlayToggleIconOptions.iconSvg;
    button.name = 'open';
    return button;
  }