Skip to content

Commit

Permalink
add tooltip on hover on repeat/loop, shuffle and playlist for issue a…
Browse files Browse the repository at this point in the history
  • Loading branch information
russellschmidt committed May 9, 2017
1 parent d6f19f6 commit e7a5226
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/components/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,14 @@ class Player extends Component {
onClick={this.toggleRepeat}
>
<i className="icon ion-loop" />
<span className="player-button-tooltip">Repeat</span>
</div>
<div
className={`player-button ${(this.state.shuffle ? ' active' : '')}`}
onClick={this.toggleShuffle}
>
<i className="icon ion-shuffle" />
<span className="player-button-tooltip">Shuffle</span>
</div>
<Popover className="player-button top-right">
<i className="icon ion-android-list" />
Expand Down
1 change: 1 addition & 0 deletions scripts/components/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Popover extends Component {
>
{children[0]}
{isOpen ? children[1] : null}
<span className="player-button-tooltip">Playlist</span>
</div>
);
}
Expand Down
20 changes: 20 additions & 0 deletions styles/custom/components/player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
& > i {
color: #A6D2A5;
}

.player-button-tooltip {
margin-left: -22px;
&::after {
content: ' off';
}
}
}

&:hover {
Expand All @@ -72,6 +79,10 @@
.ion-ios-pause {
color: #86AB85;
}

.player-button-tooltip {
display: block;
}
}

& + .player-button {
Expand All @@ -83,6 +94,15 @@
}
}

.player-button-tooltip {
display: none;
position: absolute;
color: #222;
font-size: 10px;
margin-left: -12px;
margin-top: -31px;
}

.player-seek {
flex: 1;
}
Expand Down

0 comments on commit e7a5226

Please sign in to comment.