Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
taniavozniuk committed Jan 29, 2025
1 parent 77aa7a4 commit bb7f57c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
20 changes: 11 additions & 9 deletions src/components/TodoFilter/TodoFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ export const TodoFilter: React.FC<TodoFilterProps> = ({
<i className="fas fa-magnifying-glass" />
</span>

<span className="icon is-right" style={{ pointerEvents: 'all' }}>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<button
data-cy="clearSearchButton"
type="button"
className="delete"
onClick={() => onQueryChange('')}
/>
</span>
{query !== '' && (
<span className="icon is-right" style={{ pointerEvents: 'all' }}>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<button
data-cy="clearSearchButton"
type="button"
className="delete"
onClick={() => onQueryChange('')}
/>
</span>
)}
</p>
</form>
);
5 changes: 4 additions & 1 deletion src/components/TodoList/TodoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export const TodoList: React.FC<Props> = ({
<td className="is-vcentered">{todo.id}</td>
<td className="is-vcentered">
{todo.completed ? (
<span className="icon has-text-success">
<span
className="icon has-text-success"
data-cy="iconCompleted"
>
<i className="fas fa-check" />
</span>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/TodoModal/TodoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const TodoModal: React.FC<TodoModalProps> = ({ todo, onClose }) => {
<a href={`mailto:${user.email}`} data-cy="modal-user-email">
{user.name}
</a>
)}{' '}
)}
</p>
</div>
</div>
Expand Down

0 comments on commit bb7f57c

Please sign in to comment.