@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
22 lines (21 loc) • 765 B
TypeScript
interface WindowDimensionsParams {
getHeight?: boolean;
getDeviceType?: boolean;
}
type WindowDimensions<T extends WindowDimensionsParams> = {
width: number;
} & (T['getHeight'] extends true ? {
height: number;
} : {}) & (T['getDeviceType'] extends true ? {
deviceType: 'mobile' | 'tablet' | 'midTablet' | 'laptop' | 'desktop' | 'wide';
} : {});
/**
*
* A react hook that returns the width,height and the device type.
* @description A react hook that returns the width,height and the device type.
* until the issue above is fixed.
* @param {WindowDimensionsParams} params
* @returns {WindowDimensions}
*/
export declare const useWindowDimensionsAndDevice: <T extends WindowDimensionsParams>(params?: T) => WindowDimensions<T>;
export {};