Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

SC-1079 Babel Fix #38

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
],
"presets": [
"module:metro-react-native-babel-preset"
]
}
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "react-native-deprecated-custom-components",
"name": "@click-therapeutics-org/react-native-deprecated-custom-components",
"version": "0.1.1",
"description": "Deprecated custom components that originally shipped with React Native",
"repository": {
"type": "git",
"url": "[email protected]:facebookarchive/react-native-custom-components.git"
},
"main": "src/CustomComponents.js",
"scripts": {
"build": "npx babel ./src --out-dir ./dist --copy-files",
"prepublishOnly": "npm run build"
},
"main": "dist/CustomComponents.js",
"dependencies": {
"fbjs": "~0.8.9",
"immutable": "~3.7.6",
Expand All @@ -15,6 +19,13 @@
"react-timer-mixin": "^0.13.2",
"rebound": "^0.0.13"
},
"devDependencies": {
"@babel/cli": "^7.11.5",
"@babel/core": "^7.11.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
"metro-react-native-babel-preset": "^0.56.4"
},
"peerDependencies": {
"react-native": "*"
}
Expand Down
3 changes: 3 additions & 0 deletions src/NavigatorNavigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ class NavigatorNavigationBar extends React.Component {
var component = this._components[componentName].get(this.props.navState.routeStack[index]);
var props = this._getReusableProps(componentName, index);
if (component && interpolate[componentName](props.style, amount)) {
if (isNaN(props.style.left)) {
delete props.style.left;
}
props.pointerEvents = props.style.opacity === 0 ? 'none' : 'box-none';
component.setNativeProps(props);
}
Expand Down