Add a progress bar

This commit is contained in:
Alfred Melch 2019-12-22 12:17:15 +01:00
parent b88721b4f8
commit c774725270
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import React from 'react'
import { useSelector } from 'react-redux'
import { selectCurrentSegmentIndex, selectSegments } from '../store/selectors'
export const Progress = () => {
const curIdx = useSelector(selectCurrentSegmentIndex)
const segments = useSelector(selectSegments)
return (
<progress
style={{ width: '100%' }}
value={curIdx}
max={segments.length - 1}
/>
)
}

View File

@ -8,6 +8,7 @@ import { PlayerControl } from './PlayerControl'
import styles from './RsvpReader.css'
import { PipeMarker, BorderMarker } from './PivotMarker'
import { Progress } from './Progress'
export const RsvpReader = () => {
return (
@ -16,6 +17,7 @@ export const RsvpReader = () => {
<TextInput />
</div>
<div className={styles.mainItem}>
<Progress />
<BorderMarker>
<Segment />
</BorderMarker>