Ivan - Improve tooltip styling and animation [skip ci]
This commit is contained in:
parent
488633b0c2
commit
750251311c
|
@ -28,7 +28,7 @@ class Tooltip extends React.Component {
|
|||
|
||||
renderAnimatedMessage() {
|
||||
return (
|
||||
<Motion defaultStyle={{opacity: 0}} style={{opacity: spring(1)}}>
|
||||
<Motion defaultStyle={{opacity: 0, top: -30}} style={{opacity: spring(1), top: spring(0)}}>
|
||||
{this.renderMessage.bind(this)}
|
||||
</Motion>
|
||||
)
|
||||
|
@ -36,7 +36,7 @@ class Tooltip extends React.Component {
|
|||
|
||||
renderMessage(animation) {
|
||||
return (
|
||||
<div style={animation}>
|
||||
<div className="tooltip__animated-container" style={animation}>
|
||||
<span className="tooltip__pointer-shadow"/>
|
||||
<span className="tooltip__pointer"/>
|
||||
<div className="tooltip__message">
|
||||
|
|
|
@ -8,12 +8,15 @@
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
&__animated-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&__message {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: -25%;
|
||||
margin-bottom: 15px;
|
||||
margin-left: -10px;
|
||||
margin-left: -15px;
|
||||
border: 0 solid rgba(0, 0, 0, 0.247059);
|
||||
box-shadow: rgba(0, 0, 0, 0.247059) 0 -1px 4px;
|
||||
border-radius: 4px;
|
||||
|
|
Loading…
Reference in New Issue