Remove classSet/cx
Cheng Lou committed
Mar 23, 2015 at 17:59 UTC
18ab88aa78a7a09344d6a329106d66f9f793e18d
2 files changed
-54
src/browser/ReactWithAddons.js
-2
@@ -27,7 +27,6 @@ var ReactFragment = require('ReactFragment');
27
var ReactTransitionGroup = require('ReactTransitionGroup');
28
var ReactUpdates = require('ReactUpdates');
29
30
-var cx = require('cx');
30
var cloneWithProps = require('cloneWithProps');
31
var shallowCompare = require('shallowCompare');
32
var update = require('update');
@@ -39,7 +38,6 @@ React.addons = {
38
TransitionGroup: ReactTransitionGroup,
39
40
batchedUpdates: ReactUpdates.batchedUpdates,
42
- classSet: cx,
41
cloneWithProps: cloneWithProps,
42
createFragment: ReactFragment.create,
43
shallowCompare: shallowCompare,
src/vendor/stubs/cx.js
deleted
-52
@@ -1,52 +0,0 @@
1
-/**
2
- * Copyright 2013-2015, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- * @providesModule cx
10
- */
11
-
12
-/**
13
- * This function is used to mark string literals representing CSS class names
14
- * so that they can be transformed statically. This allows for modularization
15
- * and minification of CSS class names.
16
- *
17
- * In static_upstream, this function is actually implemented, but it should
18
- * eventually be replaced with something more descriptive, and the transform
19
- * that is used in the main stack should be ported for use elsewhere.
20
- *
21
- * @param string|object className to modularize, or an object of key/values.
22
- * In the object case, the values are conditions that
23
- * determine if the className keys should be included.
24
- * @param [string ...] Variable list of classNames in the string case.
25
- * @return string Renderable space-separated CSS className.
26
- */
27
-
28
-'use strict';
29
-var warning = require('warning');
30
-
31
-var warned = false;
32
-
33
-function cx(classNames) {
34
- if (__DEV__) {
35
- warning(
36
- warned,
37
- 'React.addons.classSet will be deprecated in a future version. See ' +
38
- 'http://fb.me/react-addons-classset'
39
- );
40
- warned = true;
41
- }
42
-
43
- if (typeof classNames == 'object') {
44
- return Object.keys(classNames).filter(function(className) {
45
- return classNames[className];
46
- }).join(' ');
47
- } else {
48
- return Array.prototype.join.call(arguments, ' ');
49
- }
50
-}
51
-
52
-module.exports = cx;