forked from platzi/curso-react-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
169 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,38 @@ | ||
import logo from './platzi.webp'; | ||
import {CreateTodoButton} from './CreateTodoButton'; | ||
import {TodoItem }from './TodoItem'; | ||
import {TodoList }from './TodoList'; | ||
import {TodoCont }from './TodoCont'; | ||
import{TodoSearch}from './TodoSearch'; | ||
import './App.css'; | ||
import React from 'react'; | ||
|
||
const defaultTodos =[ | ||
{ text: 'Start the React course' , conplete: false }, | ||
{ text:'Finish the app ToDo', conplete: false }, | ||
{ text: 'Deploy the project in github pages', conplete: false} | ||
] | ||
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> | ||
</div> | ||
<React.Fragment> | ||
<TodoCont cont={1}/> | ||
<TodoSearch/> | ||
<TodoList> | ||
{defaultTodos.map(todo =>( | ||
<TodoItem | ||
key={todo.text} | ||
text = {todo.text} | ||
completd= {todo.conplete} | ||
/> | ||
))} | ||
</TodoList> | ||
< CreateTodoButton/> | ||
</React.Fragment> | ||
|
||
); | ||
} | ||
|
||
|
||
|
||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
button { | ||
display: center; | ||
padding: 10px 20px; | ||
font-size: 1em; | ||
color: #fff; | ||
background-color: #cc9873; | ||
border: none; | ||
border-radius: 50%; | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; | ||
} | ||
|
||
button:hover { | ||
background-color: #a89766; | ||
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); | ||
transform: rotate(180deg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import "./CreateTodoButton.css" | ||
function CreateTodoButton(){ | ||
return( | ||
<button> + </button> | ||
) | ||
} | ||
export { CreateTodoButton }; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
h1 { | ||
font-size: 2em; | ||
text-align: center; | ||
color: #906e5c; | ||
transition: color 0.3s ease; | ||
} | ||
|
||
h1:hover { | ||
color: #c59056; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import "./TodoCont.css" | ||
function TodoCont(props){ | ||
return ( | ||
<h1> | ||
I complete the {props.cont} task, I gather all the components for the render | ||
</h1> | ||
) | ||
} | ||
|
||
export { TodoCont }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
li { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 10px; | ||
background-color: #f9f9f9; | ||
border-radius: 5px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
transition: box-shadow 0.3s ease; | ||
width: 100%; | ||
} | ||
|
||
li:hover { | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
span { | ||
font-weight: bold; | ||
color: #caa275; | ||
} | ||
|
||
p { | ||
margin: 0; | ||
color: #555; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import "./TodoItem.css" | ||
function TodoItem(props){ | ||
return( | ||
<li> | ||
<span> V {props.completed}</span> | ||
<p>{props.text}</p> | ||
<span>X </span> | ||
</li> | ||
); | ||
} | ||
export { TodoItem}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ul { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
padding: 0; | ||
margin: 20px 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import "./TodoList.css" | ||
function TodoList (props){ | ||
return ( | ||
<ul> | ||
{props.children} | ||
</ul> | ||
) | ||
} | ||
|
||
export { TodoList }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
input[type="text"] { | ||
width: 100%; | ||
padding: 10px; | ||
margin: 10px 0; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
transition: box-shadow 0.3s ease; | ||
text-align: center; | ||
} | ||
|
||
input[type="text"]:focus { | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import "./TodoSearch.css" | ||
function TodoSearch(){ | ||
return( | ||
<input type="text" placeholder="Cut the onios"></input> | ||
) | ||
} | ||
|
||
export { TodoSearch}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-image: url('./Img/Backgroun1.png'); | ||
background-size: cover; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | ||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | ||
sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
padding: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5); | ||
} | ||
|
||
code { | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | ||
monospace; | ||
.container { | ||
max-width: 400px; | ||
width: 100%; | ||
background-color: #fff; | ||
padding: 20px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
border-radius: 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ import App from './App'; | |
|
||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render(<App />); | ||
|