@material-ui/icons#VolumeUp TypeScript 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: VolumeSlider.tsx    From Oratio with MIT License 6 votes vote down vote up
export default function VolumeSlider() {
  const { t } = useTranslation();
  const [volume, setVolume] = React.useState<number>(
    parseInt(localStorage.getItem('volume') || '25', 10)
  );

  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const handleVolumeChange = (_event: any, newValue: number | number[]) => {
    setVolume(newValue as number);
    localStorage.setItem('volume', newValue.toString());
  };

  return (
    <div>
      <Typography id="continuous-slider" gutterBottom>
        {t('Volume')}
      </Typography>
      <Grid container spacing={3}>
        <Grid item>
          <VolumeDown />
        </Grid>
        <Grid item xs>
          <Slider
            value={volume}
            onChange={handleVolumeChange}
            aria-labelledby="continuous-slider"
            valueLabelDisplay="on"
          />
        </Grid>
        <Grid item>
          <VolumeUp />
        </Grid>
      </Grid>
    </div>
  );
}
Example #2
Source File: useDeviceEnabler.tsx    From flect-chime-sdk-demo with Apache License 2.0 6 votes vote down vote up
DeivceEnableSettings: { [key in DeviceType]: DeviceEnablerSetting } = {
    Microphone: {
        onIcon: <MicOff />,
        offIcon: <Mic />,
        onTooltip: "Mic on",
        offTooltip: "Mute",
    },
    Camera: {
        onIcon: <Videocam />,
        offIcon: <VideocamOff />,
        onTooltip: "Camera off",
        offTooltip: "Camera on",
    },
    Speaker: {
        onIcon: <VolumeUp />,
        offIcon: <VolumeOff />,
        onTooltip: "Speaker off",
        offTooltip: "Speaker on",
    },
}