diff --git a/components/slider/index.en-US.md b/components/slider/index.en-US.md index d914f72eb4..54be223776 100644 --- a/components/slider/index.en-US.md +++ b/components/slider/index.en-US.md @@ -31,7 +31,8 @@ To input a value in a range. | vertical | If true, the slider will be vertical | boolean | false | | | onAfterChange | Fire when onmouseup is fired | (value) => void | - | | | onChange | Callback function that is fired when the user changes the slider's value | (value) => void | - | | -| trackStyle | The style of slider track | CSSProperties | - | | +| trackStyle | The style of slider track (the active range) | CSSProperties | - | | +| railStyle | The style of slider rail (the background) | CSSProperties | - | | | handleStyle | The style of slider handle | CSSProperties | - | | ### range diff --git a/components/slider/index.tsx b/components/slider/index.tsx index 2729e4adeb..26a082c7e5 100644 --- a/components/slider/index.tsx +++ b/components/slider/index.tsx @@ -80,6 +80,7 @@ export interface SliderSingleProps extends SliderBaseProps { onAfterChange?: (value: number) => void; handleStyle?: React.CSSProperties; trackStyle?: React.CSSProperties; + railStyle?: React.CSSProperties; } export interface SliderRangeProps extends SliderBaseProps { @@ -90,6 +91,7 @@ export interface SliderRangeProps extends SliderBaseProps { onAfterChange?: (value: [number, number]) => void; handleStyle?: React.CSSProperties[]; trackStyle?: React.CSSProperties[]; + railStyle?: React.CSSProperties; } interface SliderRange {