com design
continuous-integration/drone/push Build encountered an error Details

master
Zakariya SAOULA 2 years ago
parent e0372627df
commit e363352e03

@ -45,10 +45,8 @@ const ActionComment = ( { commentaire , postId}) => {
{createur && edit && ( {createur && edit && (
<form action="" onSubmit={handleEdit} <form action="" onSubmit={handleEdit}
className="edit-comment-form"> className="edit-comment-form">
<label htmlFor='text' onClick={() => setEdit(!edit)}>Modifier le commentaire</label> <div className="top-edit-com">
<label htmlFor='text' onClick={() => setEdit(!edit)}>Annuler</label>
<input type="text" name="text" onChange={(e) => setMessage(e.target.value)} defaultValue={commentaire.text}/>
<br/>
<div className="btn"> <div className="btn">
<span onClick={() => { <span onClick={() => {
if(window.confirm("Etes-vous sur de supprimer ce commentaire ?")){ if(window.confirm("Etes-vous sur de supprimer ce commentaire ?")){
@ -58,7 +56,12 @@ const ActionComment = ( { commentaire , postId}) => {
<i className="fas fa-trash-alt"></i> <i className="fas fa-trash-alt"></i>
</span> </span>
</div> </div>
<input type="submit" value="Modifier"/>
</div>
<input type="text" name="text" onChange={(e) => setMessage(e.target.value)} defaultValue={commentaire.text}/>
<br/>
<input className="comment-modify" type="submit" value="Modifier"/>
</form> </form>
)} )}

@ -49,9 +49,12 @@ const Comment = ({ post }) => {
</div> </div>
<span>{timestampParser(comment.timestamp)}</span> <span>{timestampParser(comment.timestamp)}</span>
</div> </div>
<div className="content-com">
<p>{comment.text}</p> <p>{comment.text}</p>
<ActionComment commentaire={comment} postId={post._id} /> <ActionComment commentaire={comment} postId={post._id} />
</div> </div>
</div>
</div> </div>
); );
})} })}

@ -95,7 +95,7 @@
} }
.comment-container { .comment-container {
display: grid; display: flex;
grid-template-columns: 50px 1fr; grid-template-columns: 50px 1fr;
border: 1px solid $color-2; border: 1px solid $color-2;
padding: 15px; padding: 15px;
@ -155,10 +155,13 @@
} }
.edit-comment-form { .edit-comment-form {
background-color: rgb(131, 131, 131);
padding: 3%;
margin-top: 14px; margin-top: 14px;
border-radius:20px 20px 20px 6px ;
label { label {
background: white; background: white;
color: $color-1; color: black;
padding: 6px 12px 5px; padding: 6px 12px 5px;
border-radius: 20px 20px 20px 6px; border-radius: 20px 20px 20px 6px;
cursor: pointer; cursor: pointer;
@ -169,29 +172,35 @@
transform: scale(1.05); transform: scale(1.05);
} }
} }
.comment-modify{
height: 30px;
}
input[type="text"] { input[type="text"] {
margin: 4px 0; margin: 4px 0;
background: white; background: white;
font-size: 1.15rem; font-size: 1rem;
padding: 16px; padding: 8px;
width: 100%; width: 100%;
border-radius: 6px 20px 6px 20px; border-radius: 6px 20px 6px 20px;
} }
label{
background-color: rgb(188, 184, 184);
}
.btn { .btn {
display: flex; display: flex;
align-items: center; align-items: center;
float: right; float: right;
span { span {
background: white; background: rgb(102, 27, 27);
padding: 10px 5px; padding: 3px 5px;
border-radius: 50px; border-radius: 50px;
margin-right: 6px; margin-right: 6px;
transition: 0.2s; transition: 0.2s;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
background: $color-2; background: red;
} }
img { img {
@ -213,23 +222,24 @@
} }
} }
.comment-form { .comment-form {
margin-top: 6px; margin-top: 6px;
input[type="text"] { input[type="text"] {
width: 100%; width: 100%;
background: $color-4; background: rgb(215, 215, 215);
border-radius: 20px 20px 6px 20px; border-radius: 20px 20px 6px 20px;
padding: 20px; padding: 10px;
font-size: 1.4rem; font-size: 1rem;
&:focus { &:focus {
box-shadow: 0 0 2px rgba(51, 51, 51, 0.5); box-shadow: 0 0 2px rgba(125, 123, 123, 0.5);
} }
} }
input[type="submit"] { input[type="submit"] {
margin-top: 4px; margin-top: 4px;
padding: 12px 16px; padding: 10px 16px;
width: 120px; width: 120px;
background: $color-2; background: $color-2;
border-radius: 20px 6px 20px 20px; border-radius: 20px 6px 20px 20px;
@ -253,6 +263,23 @@
} }
} }
.top-edit-com {
display: row;
justify-content: space-between;
align-items: center;
}
.content-com {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.right-part {
width: 80%;
}
.like-container { .like-container {
span { span {
font-size: 1.02rem; font-size: 1.02rem;

Loading…
Cancel
Save