diff --git a/assets/index.less b/assets/index.less index a736195..66717e3 100644 --- a/assets/index.less +++ b/assets/index.less @@ -131,55 +131,6 @@ cursor: not-allowed!important; } } - - // slider tooltip style - &-tooltip { - position: absolute; - left: -9999px; - top: -9999px; - z-index: 4; - visibility: visible; - - .borderBox(); - - &-hidden { - display: none; - } - - &-placement-top { - padding: @tooltip-arrow-width 0 @tooltip-distance 0; - } - - &-inner { - padding: 6px 2px; - min-width: 24px; - height: 24px; - font-size: 12px; - line-height: 1; - color: @tooltip-color; - text-align: center; - text-decoration: none; - background-color: @tooltip-bg; - border-radius: @border-radius-base; - box-shadow: 0 0 4px #d9d9d9; - } - - &-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - } - - &-placement-top &-arrow { - bottom: @tooltip-distance - @tooltip-arrow-width; - left: 50%; - margin-left: -@tooltip-arrow-width; - border-width: @tooltip-arrow-width @tooltip-arrow-width 0; - border-top-color: @tooltip-arrow-color; - } - } } .motion-common() { @@ -241,3 +192,51 @@ transform: scale(0, 0); } } + +.rc-tooltip { + position: absolute; + left: -9999px; + top: -9999px; + z-index: 4; + visibility: visible; + + .borderBox(); + + &-hidden { + display: none; + } + + &-placement-top { + padding: @tooltip-arrow-width 0 @tooltip-distance 0; + } + + &-inner { + padding: 6px 2px; + min-width: 24px; + height: 24px; + font-size: 12px; + line-height: 1; + color: @tooltip-color; + text-align: center; + text-decoration: none; + background-color: @tooltip-bg; + border-radius: @border-radius-base; + box-shadow: 0 0 4px #d9d9d9; + } + + &-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + } + + &-placement-top &-arrow { + bottom: @tooltip-distance - @tooltip-arrow-width; + left: 50%; + margin-left: -@tooltip-arrow-width; + border-width: @tooltip-arrow-width @tooltip-arrow-width 0; + border-top-color: @tooltip-arrow-color; + } +} \ No newline at end of file diff --git a/src/Handle.jsx b/src/Handle.jsx index 80df82e..929d330 100644 --- a/src/Handle.jsx +++ b/src/Handle.jsx @@ -39,7 +39,7 @@ export default class Handle extends React.Component { const isTooltipVisible = dragging || this.state.isTooltipVisible; return ({tipFormatter ? tipFormatter(value) : value}}