@99xt/first-born
Advanced tools
Comparing version 1.1.7 to 1.1.8
{ | ||
"name": "@99xt/first-born", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "React Native UI Framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -60,4 +60,4 @@ import React, { Component } from "react"; | ||
Card.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
description: PropTypes.string, | ||
title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, | ||
description: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
image: PropTypes.shape({ | ||
@@ -64,0 +64,0 @@ ...Image.propTypes |
@@ -123,4 +123,4 @@ import React, { Component } from "react"; | ||
ListItem.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
description: PropTypes.string, | ||
title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, | ||
description: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
image: PropTypes.shape({ | ||
@@ -127,0 +127,0 @@ ...Thumbnail.propTypes |
@@ -92,4 +92,4 @@ import React, { Component } from "react"; | ||
ThinListItem.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
description: PropTypes.string, | ||
title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, | ||
description: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
image: PropTypes.shape({ | ||
@@ -96,0 +96,0 @@ ...Thumbnail.propTypes |
import React, { Component } from "react"; | ||
import { View, StyleSheet, Platform } from "react-native"; | ||
import PropTypes from "prop-types"; | ||
import { deviceVariables } from "../../../variables/deviceVariables"; | ||
import { commonColors } from "../../../utils/color"; | ||
@@ -8,2 +9,28 @@ import { isIphoneX } from "../../../utils/platform"; | ||
export class TabBar extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
orientation: | ||
deviceVariables.height > deviceVariables.width | ||
? "portrait" | ||
: "landscape" | ||
}; | ||
} | ||
layoutChange(val) { | ||
let maxComp = Math.max(deviceVariables.width, deviceVariables.height); | ||
if (val.width >= maxComp) { | ||
this.setState({ orientation: "landscape" }); | ||
} else { | ||
this.setState({ orientation: "portrait" }); | ||
} | ||
} | ||
calculatePadder(mode, inset) { | ||
const insetValues = | ||
mode === "portrait" ? inset.portrait : inset.landscape; | ||
let bottomPadder = insetValues.bottomInset; | ||
return bottomPadder; | ||
} | ||
render() { | ||
@@ -22,3 +49,9 @@ const { | ||
if (isIphoneX() && !top) { | ||
tabBarStyle.push({ paddingBottom: 15 }); | ||
tabBarStyle.push({ | ||
paddingBottom: | ||
this.calculatePadder( | ||
this.state.orientation, | ||
deviceVariables.Inset | ||
) * 0.55 | ||
}); | ||
} | ||
@@ -25,0 +58,0 @@ |
@@ -183,8 +183,4 @@ import React, { Component } from "react"; | ||
shadowProperties: { | ||
elevation: 3, | ||
shadowColor: commonColors.black, | ||
shadowOffset: { width: 0, height: 3 }, | ||
shadowOpacity: 0.4, | ||
shadowRadius: 1.2 | ||
elevation: 3 | ||
} | ||
}; |
@@ -29,11 +29,16 @@ import React, { Component } from "react"; | ||
} else if (type) { | ||
const idx = newChildren.length; | ||
switch (type) { | ||
case "back": | ||
newChildren.push(<Icon name="arrow-back" size={25} />); | ||
newChildren.push( | ||
<Icon name="arrow-back" size={25} key={idx} /> | ||
); | ||
break; | ||
case "search": | ||
newChildren.push(<Icon name="search" size={25} />); | ||
newChildren.push( | ||
<Icon name="search" size={25} key={idx} /> | ||
); | ||
break; | ||
case "drawer": | ||
newChildren.push(<Icon name="menu" size={25} />); | ||
newChildren.push(<Icon name="menu" size={25} key={idx} />); | ||
break; | ||
@@ -43,3 +48,3 @@ } | ||
if (Platform.OS === "ios" && type === "back") { | ||
newChildren.push(<Text>Back</Text>); | ||
newChildren.push(<Text key={idx + 1}>Back</Text>); | ||
} | ||
@@ -46,0 +51,0 @@ } |
@@ -42,2 +42,3 @@ import React, { Component } from "react"; | ||
active={index === activePill} | ||
key={index} | ||
{...otherProps} | ||
@@ -44,0 +45,0 @@ > |
@@ -9,4 +9,6 @@ import { Platform } from "react-native"; | ||
!Platform.isTVOS && | ||
(deviceVariables.height === 812 || deviceVariables.width === 812) | ||
(deviceVariables.height === 812 || | ||
deviceVariables.width === 812 || | ||
(deviceVariables.height === 896 || deviceVariables.width === 896)) | ||
); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210701
4329