Browse Source

Add volume popup on icon hover (#298)

master
jeffvli 3 years ago
parent
commit
9410add800
  1. 23
      src/components/player/PlayerBar.tsx

23
src/components/player/PlayerBar.tsx

@ -748,11 +748,6 @@ const PlayerBar = () => {
onWheel={handleVolumeWheel} onWheel={handleVolumeWheel}
> >
{/* Volume Slider */} {/* Volume Slider */}
<VolumeIcon
icon={muted ? 'volume-off' : 'volume-down'}
onClick={() => setMuted(!muted)}
size="lg"
/>
<Whisper <Whisper
trigger="hover" trigger="hover"
placement="top" placement="top"
@ -760,14 +755,20 @@ const PlayerBar = () => {
preventOverflow preventOverflow
speaker={<Popup>{muted ? t('Muted') : Math.floor(localVolume * 100)}</Popup>} speaker={<Popup>{muted ? t('Muted') : Math.floor(localVolume * 100)}</Popup>}
> >
<Slider <VolumeIcon
value={Math.floor(localVolume * 100)} icon={muted ? 'volume-off' : 'volume-down'}
min={0} onClick={() => setMuted(!muted)}
max={100} size="lg"
onChange={handleVolumeSlider}
toolTipType="text"
/> />
</Whisper> </Whisper>
<Slider
value={Math.floor(localVolume * 100)}
min={0}
max={100}
onChange={handleVolumeSlider}
toolTipType="text"
/>
</div> </div>
</PlayerColumn> </PlayerColumn>
</FlexboxGrid.Item> </FlexboxGrid.Item>

Loading…
Cancel
Save