UNPKG

@smitch/fluid

Version:

A Next/React ui-component libray.

8 lines (7 loc) 842 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Button } from '../..'; import { FaVolumeMute, FaVolumeUp } from 'react-icons/fa'; var SoundControl = function (muted, onMute, duration, volumeLevel, handleVolumeChange) { return (_jsxs("div", { id: 'sound', className: 'flex gap-1 items-center', children: [_jsxs(Button, { title: muted ? 'Unmute Sound' : 'Mute Sound', onClick: onMute, btnBackground: 'transparent', btnColor: 'light', size: 'sm', children: [muted ? _jsx(FaVolumeMute, {}) : _jsx(FaVolumeUp, {}), _jsx("span", { className: 'sr-only', children: "Toggle Mute Sound" })] }), _jsx("input", { type: 'range', min: '0', max: '10', step: '1', value: volumeLevel, onChange: handleVolumeChange, className: 'volume-slider w-16 hidden lg:block', disabled: duration === 0 })] })); }; export default SoundControl;