Skip to content

Commit

Permalink
css del modal para que ocupe todo, z-index del boton, PReact Portals …
Browse files Browse the repository at this point in the history
…finalizado
  • Loading branch information
Misael-GC committed Nov 3, 2023
1 parent 2918217 commit 4453657
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/CreateTodoButton/CreateTodoButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
height:64px;
width:64px;
transform:rotate(0);
transition:.3s ease
transition:.3s ease;
z-index: 1;
}

.CreateTodoButton:hover{
Expand Down
2 changes: 1 addition & 1 deletion src/CreateTodoButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function CreateTodoButton(){
<button
className="CreateTodoButton"
onClick={
(event) =>{
() =>{
setOpenModal((abrirModal) => !abrirModal)
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/Modal/Modal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.ModalBackground{
background-color: rgba(32,35,41,.8);
display: flex;
justify-content: center;
align-items: center;
color: white;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
3 changes: 2 additions & 1 deletion src/Modal/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom';
import './Modal.css'

function Modal({children}) {
return ReactDOM.createPortal(
<div className='Modal'>
<div className='ModalBackground'>
{children}
</div>,
document.getElementById('modal')
Expand Down
5 changes: 3 additions & 2 deletions src/TodoForm/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from "react";
import './TodoForm.css'
import { AiTwotoneEdit } from "react-icons/ai";

function TodoForm() {
return (
<form className="formModal">
{" "}
{/* conecta con el submi */}
<label>Escribe tu nueva tarea</label>
<label>Escribe tu nueva tarea <AiTwotoneEdit/></label>
<textarea

placeholder="Actividad por hacer"
placeholder="Actividad por hacer 🚀"
/>
<div className="TodoForm-buttonContainer">
<button
Expand Down

0 comments on commit 4453657

Please sign in to comment.