Skip to content

Commit a93c34e

Browse files
russellschmidtandrewngu
authored andcommitted
add tooltip on hover on repeat/loop, shuffle and playlist for issue #87 (#99)
1 parent d6f19f6 commit a93c34e

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Diff for: scripts/components/Player.js

+2
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,14 @@ class Player extends Component {
458458
onClick={this.toggleRepeat}
459459
>
460460
<i className="icon ion-loop" />
461+
<span className="player-button-tooltip">Repeat</span>
461462
</div>
462463
<div
463464
className={`player-button ${(this.state.shuffle ? ' active' : '')}`}
464465
onClick={this.toggleShuffle}
465466
>
466467
<i className="icon ion-shuffle" />
468+
<span className="player-button-tooltip">Shuffle</span>
467469
</div>
468470
<Popover className="player-button top-right">
469471
<i className="icon ion-android-list" />

Diff for: scripts/components/Popover.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class Popover extends Component {
5858
>
5959
{children[0]}
6060
{isOpen ? children[1] : null}
61+
<span className="player-button-tooltip">Playlist</span>
6162
</div>
6263
);
6364
}

Diff for: styles/custom/components/player.scss

+20
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@
6060
& > i {
6161
color: #A6D2A5;
6262
}
63+
64+
.player-button-tooltip {
65+
margin-left: -22px;
66+
&::after {
67+
content: ' off';
68+
}
69+
}
6370
}
6471

6572
&:hover {
@@ -72,6 +79,10 @@
7279
.ion-ios-pause {
7380
color: #86AB85;
7481
}
82+
83+
.player-button-tooltip {
84+
display: block;
85+
}
7586
}
7687

7788
& + .player-button {
@@ -83,6 +94,15 @@
8394
}
8495
}
8596

97+
.player-button-tooltip {
98+
display: none;
99+
position: absolute;
100+
color: #222;
101+
font-size: 10px;
102+
margin-left: -12px;
103+
margin-top: -31px;
104+
}
105+
86106
.player-seek {
87107
flex: 1;
88108
}

0 commit comments

Comments
 (0)