import React, { FC } from 'react'; import { Row, StyledSeekBar } from './styles'; import { SeekBarProps } from './types'; export const SeekBar: FC = ({ currentTime, duration, onSeek, allowSeek }) => { const progress = duration > 0 ? (currentTime / duration) * 100 : 0; return ( onSeek(parseFloat(e.target.value))} disabled={!allowSeek} aria-label="Seek Bar" progress={progress} /> ); };