@developer.notchatbot/webchat
Version:
A beautiful React chatbot widget with single-file bundle
20 lines (19 loc) • 673 B
TypeScript
/**
* Device detection utilities for WebChat
*/
/**
* Detects if the current device is mobile based on user agent and screen size
* @returns {boolean} true if mobile, false if desktop
*/
export declare const isMobileDevice: () => boolean;
/**
* Gets the current device type
* @returns {'mobile' | 'desktop'}
*/
export declare const getDeviceType: () => "mobile" | "desktop";
/**
* Adds a resize listener to detect device type changes
* @param callback Function to call when device type changes
* @returns Cleanup function to remove the listener
*/
export declare const onDeviceTypeChange: (callback: (deviceType: "mobile" | "desktop") => void) => (() => void);