Skip to content

Commit

Permalink
fix: handleStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
paranoidjk committed Jun 8, 2017
1 parent 61452fa commit 02f0a07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/range.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ ReactDOM.render(
</div>
<div style={style}>
<p>Multi Range with custom track and handle style</p>
<Range count={3} defaultValue={[20, 40, 60, 80]} pushable />
<Range count={3} defaultValue={[20, 40, 60, 80]} pushable
trackStyle={[{ backgroundColor: 'red' }, { backgroundColor: 'green' }]}
handleStyle={[{ backgroundColor: 'yellow' }, { backgroundColor: 'gray' }]}
Expand Down
5 changes: 3 additions & 2 deletions src/createSliderWithTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default function createSliderWithTooltip(Component) {
return class ComponentWrapper extends React.Component {
static propTypes = {
tipFormatter: PropTypes.func,
handleStyle: PropTypes.arrayOf(PropTypes.object),
};
static defaultProps = {
tipFormatter(value) { return value; },
Expand All @@ -26,8 +27,8 @@ export default function createSliderWithTooltip(Component) {
};
});
}
handleWithTooltip = ({ value, dragging, index, disabled, handleStyle, ...restProps }) => {
const { tipFormatter } = this.props;
handleWithTooltip = ({ value, dragging, index, disabled, ...restProps }) => {
const { tipFormatter, handleStyle } = this.props;
return (
<Tooltip
prefixCls="rc-slider-tooltip"
Expand Down

0 comments on commit 02f0a07

Please sign in to comment.