Skip to content

Commit

Permalink
React Project
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanDaGue committed Aug 23, 2024
1 parent c739483 commit bd8a95b
Show file tree
Hide file tree
Showing 15 changed files with 169 additions and 24 deletions.
45 changes: 29 additions & 16 deletions src/App.js
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;
17 changes: 17 additions & 0 deletions src/CreateTodoButton.css
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);
}
7 changes: 7 additions & 0 deletions src/CreateTodoButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "./CreateTodoButton.css"
function CreateTodoButton(){
return(
<button> + </button>
)
}
export { CreateTodoButton };
Binary file added src/Img/Backgroun1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Img/Backgroun2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/TodoCont.css
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;
}

10 changes: 10 additions & 0 deletions src/TodoCont.js
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 };
25 changes: 25 additions & 0 deletions src/TodoItem.css
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;
}
11 changes: 11 additions & 0 deletions src/TodoItem.js
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};
7 changes: 7 additions & 0 deletions src/TodoList.css
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;
}
10 changes: 10 additions & 0 deletions src/TodoList.js
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 };
15 changes: 15 additions & 0 deletions src/TodoSearch.css
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;
}
8 changes: 8 additions & 0 deletions src/TodoSearch.js
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};
26 changes: 18 additions & 8 deletions src/index.css
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;
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);

0 comments on commit bd8a95b

Please sign in to comment.