diff --git a/index.d.ts b/index.d.ts index 3784c7a..290eb71 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,11 +2,37 @@ import * as ReactNative from "react-native"; declare module "react-native-size-matters" { + interface StringifiedStyles { + fontSize?: string | number; + letterSpacing?: string | number; + lineHeight?: string | number; + textShadowRadius?: string | number; + textShadowOffset?: { width: number | string; height: number | string; }; + shadowOffset?: { width: number | string; height: number | string; }; + borderBottomLeftRadius?: string | number; + borderBottomRightRadius?: string | number; + borderTopLeftRadius?: string | number; + borderTopRightRadius?: string | number; + borderBottomWidth?: string | number; + borderTopWidth?: string | number; + borderRightWidth?: string | number; + borderLeftWidth?: string | number; + borderRadius?: string | number; + shadowRadius?: string | number; + borderWidth?: string | number; + aspectRatio?: string | number; + rotation?: string | number; + scaleX?: string | number; + scaleY?: string | number; + translateX?: string | number; + translateY?: string | number; + } + export function scale(size: number): number; export function verticalScale(size: number): number; export function moderateScale(size: number, factor?: number): number; - type NamedStyles = { [P in keyof T]: ReactNative.ViewStyle | ReactNative.TextStyle | ReactNative.ImageStyle }; + type NamedStyles = { [P in keyof T]: ReactNative.ViewStyle | ReactNative.TextStyle | ReactNative.ImageStyle | StringifiedStyles }; export namespace ScaledSheet { export function create>(stylesObject: T): { [P in keyof T]: ReactNative.RegisteredStyle }; diff --git a/package.json b/package.json index 7e61c06..c11259b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-size-matters", - "version": "0.1.3", + "version": "0.1.4", "description": "A React-Native utility belt for scaling the size your apps UI across different sized devices", "main": "index.js", "scripts": {