1import { TbMicrophone as UnmuteIcon } from "react-icons/tb";
2import { TbMicrophoneOff as MuteIcon } from "react-icons/tb";
3
4import SecondaryButton from "./secondary-button";
5
6export default function MuteButton({
7 audioStarted,
8 handleToggleAudio,
9}: Readonly<{
10 audioStarted: boolean;
11 handleToggleAudio: () => void;
12}>) {
13 return (
14 <button
15 onClick={handleToggleAudio}
16 title={audioStarted ? "Mute" : "Unmute"}
17 >
18 <SecondaryButton>
19 <div className="flex flex-row items-center gap-2 p-2">
20 {audioStarted ? (
21 <UnmuteIcon size="1.5em" />
22 ) : (
23 <MuteIcon size="1.5em" />
24 )}
25 <p>{audioStarted ? "Mute" : "Unmute"}</p>
26 </div>
27 </SecondaryButton>
28 </button>
29 );
30}