set theme of comments inside user-info to light
This commit is contained in:
@@ -4,12 +4,16 @@ import { h } from 'preact';
|
||||
import Comment from 'components/comment';
|
||||
import Preloader from 'components/preloader';
|
||||
|
||||
const LastCommentsList = ({ comments, isLoading }) => {
|
||||
const LastCommentsList = ({ comments, isLoading, mods = {} }) => {
|
||||
if (isLoading) {
|
||||
return <Preloader mix="user-info__preloader" />;
|
||||
}
|
||||
|
||||
return <div>{comments.map(comment => <Comment data={comment} mods={{ level: 0, view: 'user' }} />)}</div>;
|
||||
return (
|
||||
<div>
|
||||
{comments.map(comment => <Comment data={comment} mods={{ level: 0, view: 'user', theme: mods.theme }} />)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LastCommentsList;
|
||||
|
||||
@@ -51,11 +51,11 @@ class UserInfo extends Component {
|
||||
|
||||
return (
|
||||
<div className={b('user-info', props)}>
|
||||
<Avatar mix="user-info__avatar" picture={isDefaultPicture ? null : picture} />
|
||||
<Avatar mods={{ theme: 'light' }} mix="user-info__avatar" picture={isDefaultPicture ? null : picture} />
|
||||
<p className="user-info__title">Last comments by {name}</p>
|
||||
<p className="user-info__id">{id}</p>
|
||||
|
||||
{!!comments && <LastCommentsList isLoading={isLoading} comments={comments} />}
|
||||
{!!comments && <LastCommentsList mods={{ theme: 'light' }} isLoading={isLoading} comments={comments} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user