Skip to content

Commit

Permalink
Version 0.0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
EQuimper committed Sep 19, 2018
1 parent 62493c9 commit 4c2e01c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -268,7 +268,7 @@ class MyComponent extends Component {
}}
/>
</Box>
<Box border={2} align="end" justify="center" h={200} w={1} bg="red">
<Box border={2} align="end" justify="center" h={200} w="100%" bg="red">
<Box bg="blue" f={1} />
<Box bg="green" f={2} />
</Box>
Expand Down
4 changes: 2 additions & 2 deletions lib/components/Box.tsx
Expand Up @@ -37,7 +37,7 @@ export interface IInjectedProps {
theme: ITheme;
}

export interface UtilityBoxProps {
export interface UtilityBoxProps extends ViewProps {
style?: StyleProp<ViewStyle>;

bg?: string;
Expand Down Expand Up @@ -87,7 +87,7 @@ export interface UtilityBoxProps {
rows?: number[];
}

const Box: React.SFC<IInjectedProps & UtilityBoxProps & ViewProps> = ({
const Box: React.SFC<IInjectedProps & UtilityBoxProps> = ({
theme,
m,
mb,
Expand Down
5 changes: 3 additions & 2 deletions lib/components/Text.tsx
Expand Up @@ -34,7 +34,7 @@ export interface IInjectedProps {
theme: ITheme;
}

export interface UtilityTextProps {
export interface UtilityTextProps extends TextProps {
style?: StyleProp<TextStyle>;

border?: number;
Expand Down Expand Up @@ -86,7 +86,7 @@ export interface UtilityTextProps {
weight?: string;
}

const Text: React.SFC<IInjectedProps & UtilityTextProps & TextProps> = ({
const Text: React.SFC<IInjectedProps & UtilityTextProps> = ({
theme,
border,
color,
Expand Down Expand Up @@ -200,6 +200,7 @@ const Text: React.SFC<IInjectedProps & UtilityTextProps & TextProps> = ({
});

return (
// @ts-ignore
<RnText {...rest} style={style.text}>
{child}
</RnText>
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/box/size.ts
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion 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",
Expand Down

0 comments on commit 4c2e01c

Please sign in to comment.