Skip to content

Commit

Permalink
Rename: AddNewCard to AddNewTodo
Browse files Browse the repository at this point in the history
  • Loading branch information
I0I-I0I committed Aug 17, 2024
1 parent ce8414a commit b92205b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useContext, useState } from "react";
import styles from "./AddNewCard.module.css";
import styles from "./AddNewTodo.module.css";
import { TodoContext } from "../context/todoContext";
import useInput from "../../hooks/useInput";
import Input from "../UI/Input/Input";
import Button from "../UI/Button/Button";
import Modal from "../UI/Modal/Modal";
import { EditModeContext } from "../context/editMode";

const AddNewCard = () => {
const AddNewTodo = () => {
const { dispatchTodos } = useContext(TodoContext);
const [editMode] = useContext(EditModeContext);
const [isAddTodo, setIsAddTodo] = useState(false);
Expand All @@ -34,9 +34,9 @@ const AddNewCard = () => {

return (
<>
<div onClick={toggleAddTodo} className={styles.addNewCard}>
<div onClick={toggleAddTodo} className={styles.addNewTodo}>
<span className={styles.plus}>+</span>
Add new card
Add new todo
</div>

{isAddTodo && (
Expand Down Expand Up @@ -64,4 +64,4 @@ const AddNewCard = () => {
);
};

export default AddNewCard;
export default AddNewTodo;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.addNewCard {
.addNewTodo {
--color: #808080;

position: relative;
Expand All @@ -21,14 +21,14 @@

color: var(--color);
border-color: var(--color);
transition: all .1s ease-in-out;
transition: all 0.1s ease-in-out;
}

.plus {
font-size: 4rem;
}

.addNewCard:hover {
.addNewTodo:hover {
--color: lightgreen;

cursor: pointer;
Expand Down
4 changes: 2 additions & 2 deletions src/components/TodoList/TodoList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useContext, useState } from "react";
import Todo from "../Todo/Todo";
import { TodoContext } from "../context/todoContext";
import styles from "./TodoList.module.css";
import AddNewCard from "../AddNewCard/AddNewCard";
import AddNewTodo from "../AddNewTodo/AddNewTodo";
import { EditModeContext } from "../context/editMode";

const TodoList = () => {
Expand Down Expand Up @@ -51,7 +51,7 @@ const TodoList = () => {
</li>
))}
<li>
<AddNewCard />
<AddNewTodo />
</li>
</ul>
</div>
Expand Down

0 comments on commit b92205b

Please sign in to comment.