react-native-full-responsive
Version:
Create a fully responsive React Native app for all supported platforms
25 lines • 1.4 kB
TypeScript
import type { ContextProps, MaybeNumber } from '../types';
/**
* The responsive width size will be calculated using the passed percentage.
* @param widthPercentage
* @param width screen width of device
* @returns calculated size, if the passed percentage is not a number, it will be the passed value.
*/
declare const responsiveWidth: <T extends MaybeNumber = number>(widthPercentage: T, width?: number) => number | T;
/**
* The responsive height size will be calculated using the passed percentage.
* @param heightPercentage
* @param height screen height of device
* @returns calculated size, if the passed percentage is not a number, it will be the passed value.
*/
declare const responsiveHeight: <T extends MaybeNumber = number>(heightPercentage: T, height?: number) => number | T;
/**
* The responsive scaled size will be calculated using the passed size.
* @param size
* @param width screen width of device
* @param height screen height of device
* @returns scaled size, if the passed size is not a number, it will be the passed value.
*/
declare const responsiveScale: <T extends MaybeNumber = number>(size: T, width?: number, height?: number, config?: Partial<ContextProps>) => number | T;
export { responsiveScale, responsiveWidth, responsiveHeight, responsiveScale as rs, responsiveWidth as rw, responsiveHeight as rh, };
//# sourceMappingURL=responsiveMethods.d.ts.map