Skip to content
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ class Slider extends Component {
* Whether or not the slider is required in a form.
*/
required: PropTypes.bool,
/**
* Override the inline-styles of the inner slider element.
*/
sliderStyle: PropTypes.object,
/**
* The granularity the slider can step through values.
*/
Expand All @@ -232,6 +236,7 @@ class Slider extends Component {
max: 1,
min: 0,
required: true,
sliderStyle: {},
step: 0.01,
style: {},
};
Expand Down Expand Up @@ -542,7 +547,7 @@ class Slider extends Component {

const {prepareStyles} = this.context.muiTheme;
const styles = getStyles(this.props, this.context, this.state);
const sliderStyles = styles.slider;
const sliderStyles = Object.assign({}, styles.slider, this.props.sliderStyle);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just assign onto styles.slider.


let handleStyles = {};
let percent = this.state.percent;
Expand Down