mirror of
https://github.com/sechan100/daily-routine-2.git
synced 2026-07-22 12:00:31 +00:00
fix: Group에 task가 없으면 group이 완료된 상태로 표시되는 ui를 수정
This commit is contained in:
parent
3a67ffdf87
commit
508fd22f24
3 changed files with 5 additions and 4 deletions
|
|
@ -134,7 +134,7 @@ export const BaseTaskFeature = React.memo(<T extends Task>({
|
|||
}}
|
||||
>
|
||||
<Checkbox state={task.state} />
|
||||
<CancelLineName name={task.name} cancel={TaskEntity.isChecked(task)} withoutCancelLine={task.state === "failed"} />
|
||||
<CancelLineName name={task.name} cancel={TaskEntity.isChecked(task)} transparentLine={task.state === "failed"} />
|
||||
</Touchable>
|
||||
<OptionIcon onOptionMenu={(m) => onOptionMenu(m, task)} />
|
||||
{indicator}
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ export const BaseTaskGroupFeature = React.memo(({
|
|||
<CancelLineName
|
||||
name={group.name}
|
||||
cancel={group.children.every(TaskEntity.isChecked)}
|
||||
transparentLine={group.children.length === 0}
|
||||
/>
|
||||
</AccordionSummary>
|
||||
</Touchable>
|
||||
|
|
|
|||
|
|
@ -36,17 +36,17 @@ const cancelLineStyle = css({
|
|||
interface Props {
|
||||
name: string;
|
||||
cancel: boolean;
|
||||
withoutCancelLine?: boolean;
|
||||
transparentLine?: boolean;
|
||||
}
|
||||
export const CancelLineName = ({
|
||||
name,
|
||||
cancel,
|
||||
withoutCancelLine
|
||||
transparentLine
|
||||
}: Props) => {
|
||||
return (
|
||||
<span
|
||||
className={bem("name")}
|
||||
css={[baseStyle, cancel && cancelTextStyle, cancel && !withoutCancelLine && cancelLineStyle]}
|
||||
css={[baseStyle, cancel && cancelTextStyle, cancel && !transparentLine && cancelLineStyle]}
|
||||
>
|
||||
{name}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue