Mejorado el css de comentarios
This commit is contained in:
@@ -28,14 +28,14 @@ const Opinions = (props) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Y) Y = '';
|
if (!Y) Y = '';
|
||||||
if(!N) N = '';
|
if (!N) N = '';
|
||||||
if(!F) F = '';
|
if (!F) F = '';
|
||||||
|
|
||||||
const handleClick = (type) => () => {
|
const handleClick = (type) => () => {
|
||||||
if(type === pressed){
|
if (type === pressed) {
|
||||||
setPressed(null)
|
setPressed(null)
|
||||||
}else{
|
} else {
|
||||||
setPressed(type)
|
setPressed(type)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -88,14 +88,18 @@ const Stars = (props) => {
|
|||||||
|
|
||||||
const Comment = (props) => (
|
const Comment = (props) => (
|
||||||
<div className='comment'>
|
<div className='comment'>
|
||||||
<div className='avatar-container'>
|
<div className='avatar'>
|
||||||
<FaUser/>
|
<FaUser/>
|
||||||
</div>
|
</div>
|
||||||
<div className='body'>
|
<div className='content'>
|
||||||
<Link to={`/user/${props.user.id}`} className='username'>{props.user.username}</Link>
|
<div className="header">
|
||||||
<p>{props.opinion}</p>
|
<Link to={`/user/${props.user.id}`} className='username'>{props.user.username}</Link>
|
||||||
<div className={'acciones'}>
|
|
||||||
<Stars stars={props.stars}/>
|
<Stars stars={props.stars}/>
|
||||||
|
</div>
|
||||||
|
<div className="body">
|
||||||
|
<p>{props.opinion}</p>
|
||||||
|
</div>
|
||||||
|
<div className="footer">
|
||||||
<Opinions helpful={props.helpful}/>
|
<Opinions helpful={props.helpful}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,73 +1,61 @@
|
|||||||
.comments {
|
.comment {
|
||||||
.comment {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
padding-bottom: 1em;
|
|
||||||
margin-top: 1em;
|
|
||||||
border-bottom: var(--line-width) solid var(--accent);
|
|
||||||
|
|
||||||
.avatar-container {
|
padding-bottom: 1em;
|
||||||
flex-shrink: 0;
|
margin-top: 1em;
|
||||||
width: 75px;
|
border-bottom: var(--line-width) solid var(--accent);
|
||||||
height: 75px;
|
|
||||||
margin-right: 1em;
|
|
||||||
outline: 1px var(--gray-2) solid;
|
|
||||||
background-color: rgb(230, 230, 230);
|
|
||||||
|
|
||||||
svg {
|
width: 100%;
|
||||||
padding-top: 10%;
|
|
||||||
width: 90%;
|
|
||||||
height: 90%;
|
|
||||||
color: rgb(250, 250, 250);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 75px;
|
||||||
|
height: 75px;
|
||||||
|
margin-right: 1em;
|
||||||
|
outline: 1px var(--gray-2) solid;
|
||||||
|
background-color: rgb(230, 230, 230);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
padding-top: 10%;
|
||||||
|
width: 90%;
|
||||||
|
height: 90%;
|
||||||
|
color: rgb(250, 250, 250);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 90%;
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.body {
|
|
||||||
.username {
|
.username {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stars .star {
|
||||||
|
cursor: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.acciones {
|
.body {
|
||||||
display: flex;
|
p {
|
||||||
flex-direction: row;
|
white-space: pre-wrap;
|
||||||
|
|
||||||
&>*{
|
|
||||||
margin-right: 1em;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.opinions {
|
.footer {
|
||||||
display: flex;
|
button {
|
||||||
flex-direction: row;
|
border: none;
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
button {
|
span > * {
|
||||||
border: none;
|
display: inline;
|
||||||
background-color: transparent;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
span > *{
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover, &.selected {
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.stars {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
|
|
||||||
.star {
|
|
||||||
margin: inherit;
|
|
||||||
width: 1.5em;
|
|
||||||
height: 1.5em;
|
|
||||||
cursor: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.star.selected {
|
&:hover, &.selected {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user