diff --git a/package.json b/package.json index 58866dc17..fc8e442b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-slider", - "version": "7.0.1", + "version": "7.0.2", "description": "Slider UI component for React", "keywords": [ "react", @@ -68,7 +68,6 @@ "dependencies": { "babel-runtime": "6.x", "classnames": "^2.2.5", - "object-assign": "^4.1.1", "prop-types": "^15.5.4", "rc-tooltip": "^3.4.2", "rc-util": "^4.0.0", diff --git a/src/Handle.jsx b/src/Handle.jsx index c878af73a..4442a0c72 100644 --- a/src/Handle.jsx +++ b/src/Handle.jsx @@ -1,6 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import assign from 'object-assign'; export default class Handle extends React.Component { render() { @@ -8,7 +7,12 @@ export default class Handle extends React.Component { className, vertical, offset, handleStyle, ...restProps, } = this.props; const style = vertical ? { bottom: `${offset}%` } : { left: `${offset}%` }; - return
; + + const elStyle = { + ...style, + ...handleStyle, + }; + return
; } } diff --git a/src/common/Track.jsx b/src/common/Track.jsx index 52f3d7b5d..920b43de8 100644 --- a/src/common/Track.jsx +++ b/src/common/Track.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import assign from 'object-assign'; const Track = ({ className, included, vertical, offset, length, minimumTrackStyle, @@ -14,8 +13,11 @@ const Track = ({ style.left = `${offset}%`; style.width = `${length}%`; } - - return
; + const elStyle = { + ...style, + ...minimumTrackStyle, + }; + return
; }; export default Track;