From eb18232523436814ae1c400e93e1e72de933e872 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Wed, 28 Oct 2015 11:31:24 +0800 Subject: [PATCH] docs: add docs for feature range --- README.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e462d68..b1b1521 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ ReactDOM.render(, container); className String rc-slider - additional css class of root dom node + Additional css class for the root dom node min @@ -94,41 +94,59 @@ ReactDOM.render(, container); 1 Value to be added or subtracted on each step the slider makes. Must be greater than zero. max - min should be evenly divisible by the step value. - + + range + boolean + false + Determines the type of slider. If range is `true`, two handles will be rendered in order to select a range. + + defaultValue number 0 - Determines the initial positions of the handles. + If range is `false`, this prop will set the initial position of the handle. - + + defaultValues + [number, number] + [0, 0] + If range is `true`, this prop will set initial positions of handles respectively. + + value number - Determines the current positions of the handles. + If range is `false`, this prop will set the current position of the handle. + + + values + [number, number] + + If range is `true`, this prop will set current positions of handles respectively. marks array [] - mark every step for the slider, it will ignore the `step` parameter if it has been defined + Mark every step for the slider, it will ignore the `step` parameter if it has been defined. Does not work with `range` isIncluded boolean true - if the value is true, it means a continuous value interval, otherwise, it is a independent value. + If the value is `true`, it means a continuous value interval, otherwise, it is a independent value. defaultIndex number 0 - For step or marks slider, determine the initial positions of the handles. + For step or marks slider, determines the initial position of the handle. Does not work with `range` index number - For step or marks slider, determine current positions of the handles. + For step or marks slider, determines current position of the handle. Does not work with `range` disabled