deps: replace rcUtil.classSet with classNames

This commit is contained in:
Benjy Cui
2015-12-02 11:30:34 +08:00
parent e7d98e0ee4
commit 1262a78638
4 changed files with 8 additions and 6 deletions
+1
View File
@@ -50,6 +50,7 @@
"lint"
],
"dependencies": {
"classnames": "^2.2.1",
"rc-tooltip": "3.x",
"rc-util": "3.x"
}
+2 -2
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { classSet } from 'rc-util';
import classNames from 'classnames';
function calcPoints(marks, dots, step, min, max) {
const points = Object.keys(marks).map(parseFloat);
@@ -19,7 +19,7 @@ const Dots = ({prefixCls, marks, dots, step, included, lowerBound, upperBound, m
const isActived = (!included && point === upperBound) ||
(included && point <= upperBound && point >= lowerBound);
const pointClassName = classSet({
const pointClassName = classNames({
[prefixCls + '-dot']: true,
[prefixCls + '-dot-active']: isActived,
});
+2 -2
View File
@@ -1,5 +1,5 @@
import React from 'react';
import rcUtil from 'rc-util';
import classNames from 'classnames';
const Marks = ({className, marks, included, upperBound, lowerBound, max, min}) => {
const marksKeys = Object.keys(marks);
@@ -11,7 +11,7 @@ const Marks = ({className, marks, included, upperBound, lowerBound, max, min}) =
const elements = marksKeys.map(parseFloat).map((point) => {
const isActived = (!included && point === upperBound) ||
(included && point <= upperBound && point >= lowerBound);
const markClassName = rcUtil.classSet({
const markClassName = classNames({
[className + '-text']: true,
[className + '-text-active']: isActived,
});
+3 -2
View File
@@ -1,5 +1,6 @@
import React from 'react';
import {Dom as DomUtils, classSet} from 'rc-util';
import {Dom as DomUtils} from 'rc-util';
import classNames from 'classnames';
import Track from './Track';
import Handle from './Handle';
import Dots from './Dots';
@@ -311,7 +312,7 @@ class Slider extends React.Component {
offset={lowerOffset} value={lowerBound} dragging={handle === 'lowerBound'} />);
}
const sliderClassName = classSet({
const sliderClassName = classNames({
[prefixCls]: true,
[prefixCls + '-disabled']: disabled,
[className]: !!className,