@material-ui/icons#VolumeUp JavaScript Examples

The following examples show how to use @material-ui/icons#VolumeUp. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VolumeController.js    From qasong with ISC License 6 votes vote down vote up
function volumeBar({ volume, setVolume, condensed }) {
  function handleChange(e, newValue) {
    setVolume(newValue / 100);
  }
  const classes = useStyles();
  return (
    <Box className={classes.root} px={3}>
      <Grid container justify="center" spacing={2}>
        <Grid item>
          <VolumeDown onClick={() => setVolume(0)} />
        </Grid>
        <Grid item xs align="center">
          <Slider color="secondary" value={volume * 100} onChange={handleChange} />
        </Grid>
        {!condensed && (
          <Grid item>
            <VolumeUp onClick={() => setVolume(1)} />
          </Grid>
        )}
      </Grid>
    </Box>
  );
}