openreplay/frontend/app/player-ui/ProgressBar.tsx
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

32 lines
657 B
TypeScript

import React from 'react';
interface IProps {
scale: number;
live?: boolean;
left: number;
time: number;
}
const styles = {
display: 'block',
pointerEvents: 'none' as const,
height: '10px',
zIndex: 1,
};
const replayBg = '#d0d4f2'; // active blue border
const liveBg = 'rgba(66, 174, 94, 0.3)'; // light green shade
/** Playtime progress bar */
export function ProgressBar({ scale, live = false, left, time }: IProps) {
return (
<div
style={{
...styles,
width: `${time * scale}%`,
backgroundColor: live && left > 99 ? liveBg : replayBg,
}}
/>
);
}
ProgressBar.displayName = 'ProgressBar';