ミュージックプレイヤー

1import React, { ChangeEvent, useEffect, useState } from 'react';
2import { HiOutlineBell } from 'react-icons/hi';
3import {
4  MdOutlinePause,
5  MdPlayArrow,
6  MdVolumeMute,
7  MdVolumeUp,
8} from 'react-icons/md';
9import Siriwave from 'react-siriwave';
10import useSound from 'use-sound';
11
12const Sound = () => {
13  const [play] = useSound('/sounds/button.mp3');
14
15  return (
16    <button
17      className="flex items-center space-x-2 border border-gray-600/60 rounded-md p-2"
18      onClick={() => play()}
19    >
20      <HiOutlineBell />
21      <span>通知音を再生</span>
22    </button>
23  );
24};
25
26export default Sound;