From e030ba9f9d469d427826248b41c2925fc5a646cc Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Tue, 22 Mar 2016 16:27:50 +0800 Subject: [PATCH] refactor: rename Dots to Steps --- src/Slider.jsx | 4 ++-- src/{Dots.jsx => Steps.jsx} | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) rename src/{Dots.jsx => Steps.jsx} (87%) diff --git a/src/Slider.jsx b/src/Slider.jsx index 95fc982..2c2946f 100644 --- a/src/Slider.jsx +++ b/src/Slider.jsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import objectAssign from 'object-assign'; import Track from './Track'; import Handle from './Handle'; -import Dots from './Dots'; +import Steps from './Steps'; import Marks from './Marks'; function noop() { @@ -366,7 +366,7 @@ class Slider extends React.Component { {lower} - { +const Steps = ({prefixCls, marks, dots, step, included, + lowerBound, upperBound, max, min}) => { const range = max - min; const elements = calcPoints(marks, dots, step, min, max).map((point) => { const offset = (point - min) / range * 100 + '%'; @@ -31,4 +32,4 @@ const Dots = ({prefixCls, marks, dots, step, included, lowerBound, upperBound, m return
{elements}
; }; -export default Dots; +export default Steps;