feat(read-only config): read only ui for SEG/RT/SR (#3586)

This commit is contained in:
rodrigobasilio2022 authored and GitHub committed 2023-08-16 10:26:28 -04:00
1 parent c6d5f719e7
commit 3c4795d8cb
11 files changed
+97 -52

No files matched your search

@@ -12,6 +12,7 @@ const SegmentItem = ({
isVisible,
color,
showSegmentDelete,
disableEditing,
isLocked = false,
onClick,
onEdit,
@@ -116,17 +117,19 @@ const SegmentItem = ({
)}
{isHovering && (
<div className={classnames('flex items-center')}>
<Icon
name="row-edit"
className={classnames('w-5 h-5', {
'text-white': isLocked,
'text-primary-light': !isLocked,
})}
onClick={e => {
e.stopPropagation();
onEdit(segmentationId, segmentIndex);
}}
/>
{!disableEditing && (
<Icon
name="row-edit"
className={classnames('w-5 h-5', {
'text-white': isLocked,
'text-primary-light': !isLocked,
})}
onClick={e => {
e.stopPropagation();
onEdit(segmentationId, segmentIndex);
}}
/>
)}
{isVisible ? (
<Icon
name="row-hide"
@@ -224,6 +227,7 @@ SegmentItem.propTypes = {
segmentIndex: PropTypes.number.isRequired,
segmentationId: PropTypes.string.isRequired,
label: PropTypes.string,
disableEditing: PropTypes.bool,
// color as array
color: PropTypes.array,
isActive: PropTypes.bool.isRequired,