add css files for components

This commit is contained in:
Armen Rohalov
2025-03-26 20:30:27 +02:00
parent e18157648c
commit 9e6596f1e0
15 changed files with 301 additions and 253 deletions
@@ -0,0 +1,39 @@
.buttons-group {
display: flex;
justify-content: center;
position: relative;
z-index: 1;
padding: 10px;
background: #f5f5f5;
border-radius: 4px;
margin-top: 10px;
}
.control-btn {
padding: 10px 20px;
font-size: 16px;
margin: 0 5px;
border: 1px solid #ccc;
border-radius: 4px;
cursor: pointer;
}
.play-btn{
background: #8aff8a;
}
.pause-btn{
background: #ff8a8a;
}
.arrow-btn{
background: #e0e0e0;
}
.save-btn{
background: #8ad4ff;
}
.delete-btn{
background: #ffb38a;
}
@@ -0,0 +1,43 @@
import React from 'react';
import './AnnotationControls.css';
function AnnotationControls({ onFrameBackward, onPlayPause, isPlaying, onFrameForward, onSaveAnnotation, onDelete }) {
return (
<div className='buttons-group' >
<button
className='control-btn arrow-btn'
onClick={onFrameBackward}
title="Previous Frame"
>
</button>
<button
className={isPlaying ? 'control-btn pause-btn': 'control-btn play-btn'}
onClick={onPlayPause}
>
{isPlaying ? '⏸️ Pause' : '▶️ Play'}
</button>
<button
className='control-btn arrow-btn'
onClick={onFrameForward}
title="Next Frame"
>
</button>
<button
className='control-btn save-btn'
onClick={onSaveAnnotation}
>
💾 Save
</button>
<button
className='control-btn delete-btn'
onClick={onDelete}
>
🗑 Delete
</button>
</div>
);
}
export default AnnotationControls;