import React, { HTMLAttributes } from 'react'; import classNames from 'classnames'; import { FaPlay, FaPause, FaStepForward, FaStepBackward, FaVolumeUp } from 'react-icons/fa'; interface NowPlayingProps extends HTMLAttributes { songName: string; fileName: string; isPlaying: boolean; volume: number; onPlayPause: () => void; onSkip: () => void; onPrevious: () => void; // Sent when the volume setting actually changes value onVolumeSettingChange: (volume: number) => void; // Sent when the volume is about to start changing onVolumeWillChange: (volume: number) => void; // Sent when the volume has changed onVolumeDidChange: (volume: number) => void; } const NowPlaying: React.FC = (props) => { return (
{props.songName}
{props.fileName}
props.onVolumeWillChange(props.volume)} onMouseUp={() => props.onVolumeDidChange(props.volume)} onChange={(e) => props.onVolumeSettingChange(Number(e.target.value))} className="w-24 h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:rounded-full hover:[&::-webkit-slider-thumb]:bg-violet-300" />
); }; export default NowPlaying;