Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
fixed overflow text
  • Loading branch information
F1shez committed Nov 10, 2024
1 parent 4b30b09 commit 8989543
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/CardTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function CardTask({ todo, dispatch }: CardTaskProps) {
return (
<>
<input onChange={() => handleToggleComplete(todo.id)} type="checkbox" name="" id="" />
<div className={"ml-1 " + (todo.completed ? "text-gray-500" : "text-black")}>{todo.text}</div>
<div title={todo.text} className={"ml-1 truncate overflow-hidden " + (todo.completed ? "text-gray-500" : "text-black")}>{todo.text}</div>
</>
);
}
2 changes: 1 addition & 1 deletion src/components/TodoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function TodoList() {
}).map((todo: Todo) => (
<li
key={todo.id}
className={"mt-2 mb-2 ml-4 " + (todo.completed ? "flex line-through decoration-gray-500" : "flex")}
className={"w-full mt-2 mb-2 pl-4 " + (todo.completed ? "flex line-through decoration-gray-500" : "flex")}
>
<CardTask todo={todo} dispatch={dispatch} />
</li>
Expand Down

0 comments on commit 8989543

Please sign in to comment.