Browse Source

feat: support for railStyle prop to Slider component (#40942)

pull/41883/head
Stanislav 2 years ago
committed by GitHub
parent
commit
0e432de45c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      components/slider/index.en-US.md
  2. 2
      components/slider/index.tsx

3
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

2
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 {

Loading…
Cancel
Save