From d815d1df9a5fef1db7666da6802fb231f1f0aa1f Mon Sep 17 00:00:00 2001 From: Frank Yan Date: Fri, 4 Mar 2016 13:20:12 -0800 Subject: [PATCH] Move cssVar out of react-native-github Reviewed By: jingc Differential Revision: D3008870 fb-gh-sync-id: 2c3d9a13ba6952540369cb68d96d375cb8cf757a shipit-source-id: 2c3d9a13ba6952540369cb68d96d375cb8cf757a --- .../LegacyNavigator/NavigationBarSample.js | 6 ++-- .../Navigator/NavigationBarSample.js | 6 ++-- Libraries/Utilities/CSSVarConfig.js | 28 ------------------- Libraries/Utilities/cssVar.js | 18 ------------ 4 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 Libraries/Utilities/CSSVarConfig.js delete mode 100644 Libraries/Utilities/cssVar.js diff --git a/Examples/UIExplorer/NavigationExperimental/LegacyNavigator/NavigationBarSample.js b/Examples/UIExplorer/NavigationExperimental/LegacyNavigator/NavigationBarSample.js index 9b9081dd0..f479b2a83 100644 --- a/Examples/UIExplorer/NavigationExperimental/LegacyNavigator/NavigationBarSample.js +++ b/Examples/UIExplorer/NavigationExperimental/LegacyNavigator/NavigationBarSample.js @@ -24,8 +24,6 @@ var { TouchableOpacity, } = React; -var cssVar = require('cssVar'); - var Navigator = NavigationExperimental.LegacyNavigator; class NavButton extends React.Component { @@ -180,7 +178,7 @@ var styles = StyleSheet.create({ marginVertical: 10, }, navBarTitleText: { - color: cssVar('fbui-bluegray-60'), + color: '#373E4D', fontWeight: '500', marginVertical: 9, }, @@ -191,7 +189,7 @@ var styles = StyleSheet.create({ paddingRight: 10, }, navBarButtonText: { - color: cssVar('fbui-accent-blue'), + color: '#5890FF', }, scene: { flex: 1, diff --git a/Examples/UIExplorer/Navigator/NavigationBarSample.js b/Examples/UIExplorer/Navigator/NavigationBarSample.js index 25f45f0ab..ff44f3522 100644 --- a/Examples/UIExplorer/Navigator/NavigationBarSample.js +++ b/Examples/UIExplorer/Navigator/NavigationBarSample.js @@ -24,8 +24,6 @@ var { TouchableOpacity, } = React; -var cssVar = require('cssVar'); - class NavButton extends React.Component { render() { return ( @@ -178,7 +176,7 @@ var styles = StyleSheet.create({ marginVertical: 10, }, navBarTitleText: { - color: cssVar('fbui-bluegray-60'), + color: '#373E4D', fontWeight: '500', marginVertical: 9, }, @@ -189,7 +187,7 @@ var styles = StyleSheet.create({ paddingRight: 10, }, navBarButtonText: { - color: cssVar('fbui-accent-blue'), + color: '#5890FF', }, scene: { flex: 1, diff --git a/Libraries/Utilities/CSSVarConfig.js b/Libraries/Utilities/CSSVarConfig.js deleted file mode 100644 index 55c0244c3..000000000 --- a/Libraries/Utilities/CSSVarConfig.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - * - * @providesModule CSSVarConfig - */ -'use strict'; - -module.exports = { - 'fbui-accent-blue': '#5890ff', - 'fbui-bluegray-80': '#141823', - 'fbui-bluegray-60': '#373e4d', - 'fbui-bluegray-50': '#4e5665', - 'fbui-bluegray-40': '#6a7180', - 'fbui-bluegray-30': '#9197a3', - 'fbui-bluegray-20': '#bdc1c9', - 'fbui-bluegray-10': '#dcdee3', - 'fbui-bluegray-5': '#e9eaed', - 'fbui-bluegray-2': '#f6f7f8', - 'fbui-gray-80': '#333333', - 'fbui-gray-60': '#666666', - 'fbui-gray-40': '#999999', - 'fbui-gray-20': '#cccccc', - 'fbui-gray-10': '#e5e5e5', - 'fbui-gray-5': '#f2f2f2', - 'fbui-gray-2': '#fafafa', - 'fbui-red': '#dc3847', - 'x-mobile-medium-text': '#6a7180', -}; diff --git a/Libraries/Utilities/cssVar.js b/Libraries/Utilities/cssVar.js deleted file mode 100644 index 094689ae2..000000000 --- a/Libraries/Utilities/cssVar.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - * - * @providesModule cssVar - * @typechecks - */ -'use strict'; - -var invariant = require('fbjs/lib/invariant'); -var CSSVarConfig = require('CSSVarConfig'); - -var cssVar = function(/*string*/ key) /*string*/ { - invariant(CSSVarConfig[key], 'invalid css variable ' + key); - - return CSSVarConfig[key]; -}; - -module.exports = cssVar;