diff --git a/src/components/task-list/task-list-table-row.module.css b/src/components/task-list/task-list-table-row.module.css index 65af7b71..4f5e7d51 100644 --- a/src/components/task-list/task-list-table-row.module.css +++ b/src/components/task-list/task-list-table-row.module.css @@ -4,10 +4,6 @@ text-overflow: ellipsis; } -.lighten { - background-color: #7474ff; -} - .cut { opacity: 0.3; } @@ -35,8 +31,6 @@ } .dropAfterLighten { - color: #7474ff;; - background-color:#7474ff; border-radius: 6px; } @@ -60,8 +54,6 @@ } .dropBeforeLighten { - color: #7474ff; - background-color: #7474ff; border-radius: 6px; } diff --git a/src/components/task-list/task-list-table-row.tsx b/src/components/task-list/task-list-table-row.tsx index ac848239..6cd655d1 100644 --- a/src/components/task-list/task-list-table-row.tsx +++ b/src/components/task-list/task-list-table-row.tsx @@ -270,23 +270,26 @@ const TaskListTableRowInner: React.FC = ({ const dropPreviewOffset = distances.nestedTaskNameOffset * depth + distances.expandIconWidth; + let backgroundColor = isSelected + ? colors.selectedTaskBackgroundColor + : isEven && !dropInsideProps.isLighten + ? colors.evenTaskBackgroundColor + : undefined; + if ( + dropInsideProps.isLighten && + !dropAfterProps.isLighten && + !dropBeforeProps.isLighten + ) { + backgroundColor = colors.taskDragColor; + } + return (
= ({ className={`${styles.dropBefore} ${ dropBeforeProps.isLighten ? styles.dropBeforeLighten : "" }`} - style={{ left: dropPreviewOffset }} + style={{ + left: dropPreviewOffset, + backgroundColor: dropBeforeProps.isLighten + ? colors.taskDragColor + : undefined, + color: dropBeforeProps.isLighten ? colors.taskDragColor : undefined, + }} ref={dropBefore} />