Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Add volume popup on icon hover (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffvli committed Apr 21, 2022
1 parent d88710c commit 9410add
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/components/player/PlayerBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -748,26 +748,27 @@ const PlayerBar = () => {
onWheel={handleVolumeWheel}
>
{/* Volume Slider */}
<VolumeIcon
icon={muted ? 'volume-off' : 'volume-down'}
onClick={() => setMuted(!muted)}
size="lg"
/>
<Whisper
trigger="hover"
placement="top"
delay={200}
preventOverflow
speaker={<Popup>{muted ? t('Muted') : Math.floor(localVolume * 100)}</Popup>}
>
<Slider
value={Math.floor(localVolume * 100)}
min={0}
max={100}
onChange={handleVolumeSlider}
toolTipType="text"
<VolumeIcon
icon={muted ? 'volume-off' : 'volume-down'}
onClick={() => setMuted(!muted)}
size="lg"
/>
</Whisper>

<Slider
value={Math.floor(localVolume * 100)}
min={0}
max={100}
onChange={handleVolumeSlider}
toolTipType="text"
/>
</div>
</PlayerColumn>
</FlexboxGrid.Item>
Expand Down

0 comments on commit 9410add

Please sign in to comment.