Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions curso_react
Submodule curso_react added at ebc33f
32 changes: 18 additions & 14 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import logo from './platzi.webp';
import { TodoCounter } from './TodoCounter';
import { TodoSearch } from './TodoSearch';
import { TodoItem } from './TodoItem';
import { TodoList } from './TodoList';
import { CreateTodoButton } from './CreateTodoButton';

import './App.css';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edita el archivo <code>src/App.js</code> y guarda para recargar.
</p>
<a
className="App-link"
href="https://platzi.com/reactjs"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<TodoCounter completed={16} total={25} />
<TodoSearch />
<TodoList>
<TodoItem />
<TodoItem />
<TodoItem />
</TodoList>

<CreateTodoButton />

</div>
);
}



export default App;
7 changes: 7 additions & 0 deletions src/CreateTodoButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

function CreateTodoButton() {
return (
<button> Tarea +</button>
)
}
export { CreateTodoButton }
9 changes: 9 additions & 0 deletions src/TodoCounter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function TodoCounter({ total, completed }) {
return (
<h1>
Has completado {completed} de {total} tareas
</h1>
)
}

export { TodoCounter };
11 changes: 11 additions & 0 deletions src/TodoItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

function TodoItem() {
return (
<li>
<span>V</span>
<p>perro que ladra no muerde</p>
<span>X</span>
</li>
)
}
export { TodoItem }
11 changes: 11 additions & 0 deletions src/TodoList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function TodoList(props) {
return (
<ul>
<li>
{props.children}
</li>
</ul>
)
}

export { TodoList };
6 changes: 6 additions & 0 deletions src/TodoSearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function TodoSearch() {
return (
<input placeholder="cortar cebolla" />)
}

export { TodoSearch };