Skip to content

Commit

Permalink
handleStyle in case range
Browse files Browse the repository at this point in the history
  • Loading branch information
thinhvoxuan authored Jan 12, 2018
1 parent 7a021d4 commit e2edaa0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/createSliderWithTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export default function createSliderWithTooltip(Component) {
placement = 'top',
...restTooltipProps,
} = tipProps;

let handleStyleWithIndex = handleStyle[0];
if (handleStyle[index]) {
handleStyleWithIndex = handleStyle[index];
}

return (
<Tooltip
Expand All @@ -55,7 +60,7 @@ export default function createSliderWithTooltip(Component) {
<Handle
{...restProps}
style={{
...handleStyle[0],
...handleStyleWithIndex,
}}
value={value}
onMouseEnter={() => this.handleTooltipVisibleChange(index, true)}
Expand Down

0 comments on commit e2edaa0

Please sign in to comment.