Move cssVar out of react-native-github

Reviewed By: jingc

Differential Revision: D3008870

fb-gh-sync-id: 2c3d9a13ba6952540369cb68d96d375cb8cf757a
shipit-source-id: 2c3d9a13ba6952540369cb68d96d375cb8cf757a
This commit is contained in:
Frank Yan 2016-03-04 13:20:12 -08:00 committed by Facebook Github Bot 8
parent ab61a1fbac
commit d815d1df9a
4 changed files with 4 additions and 54 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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',
};

View File

@ -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;