From 4c2e01cf5dcca950199113ab0ae2b748dce09cd2 Mon Sep 17 00:00:00 2001 From: Emanuel Quimper Date: Wed, 19 Sep 2018 08:17:30 -0400 Subject: [PATCH] Version 0.0.30 --- README.md | 2 +- lib/components/Box.tsx | 4 ++-- lib/components/Text.tsx | 5 +++-- lib/utils/box/size.ts | 4 ++-- package.json | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 875c604..14414a5 100644 --- a/README.md +++ b/README.md @@ -268,7 +268,7 @@ class MyComponent extends Component { }} /> - + diff --git a/lib/components/Box.tsx b/lib/components/Box.tsx index 18b0733..bf4bafa 100644 --- a/lib/components/Box.tsx +++ b/lib/components/Box.tsx @@ -37,7 +37,7 @@ export interface IInjectedProps { theme: ITheme; } -export interface UtilityBoxProps { +export interface UtilityBoxProps extends ViewProps { style?: StyleProp; bg?: string; @@ -87,7 +87,7 @@ export interface UtilityBoxProps { rows?: number[]; } -const Box: React.SFC = ({ +const Box: React.SFC = ({ theme, m, mb, diff --git a/lib/components/Text.tsx b/lib/components/Text.tsx index 707ebd6..95ea075 100644 --- a/lib/components/Text.tsx +++ b/lib/components/Text.tsx @@ -34,7 +34,7 @@ export interface IInjectedProps { theme: ITheme; } -export interface UtilityTextProps { +export interface UtilityTextProps extends TextProps { style?: StyleProp; border?: number; @@ -86,7 +86,7 @@ export interface UtilityTextProps { weight?: string; } -const Text: React.SFC = ({ +const Text: React.SFC = ({ theme, border, color, @@ -200,6 +200,7 @@ const Text: React.SFC = ({ }); return ( + // @ts-ignore {child} diff --git a/lib/utils/box/size.ts b/lib/utils/box/size.ts index 963f80f..690ffc4 100644 --- a/lib/utils/box/size.ts +++ b/lib/utils/box/size.ts @@ -17,7 +17,7 @@ export const boxSizeUtils = (props: IProps) => { if (typeof h === 'string') { _style.height = h; } else if (typeof h === 'number') { - if (h <= 1) { + if (h < 1) { _style.height = `${h * 100}%`; } else { _style.height = h; @@ -31,7 +31,7 @@ export const boxSizeUtils = (props: IProps) => { if (typeof w === 'string') { _style.width = w; } else if (typeof w === 'number') { - if (w <= 1) { + if (w < 1) { _style.width = `${w * 100}%`; } else { _style.width = w; diff --git a/package.json b/package.json index df686bf..e2d9be3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-design-utility", - "version": "0.0.29", + "version": "0.0.30", "description": "react-native utility library for ui", "main": "dist/ReactNativeDesignUtility.js", "module": "dist/ReactNativeDesignUtility.es6.js",