Skip to content

Commit

Permalink
chore: adjust style of CloudUserAvatar (#8548)
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmFly committed Oct 19, 2024
1 parent 675a010 commit 3ca052c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { style } from '@vanilla-extract/css';
export const userWrapper = style({
display: 'flex',
gap: '8px',
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { useI18n } from '@affine/i18n';
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
import { useEffect, useMemo } from 'react';

import { userWrapper } from './created-updated-by.css';

const CloudUserAvatar = (props: { type: 'CreatedBy' | 'UpdatedBy' }) => {
const cloudDocMetaService = useService(CloudDocMetaService);
const cloudDocMeta = useLiveData(cloudDocMetaService.cloudDocMeta.meta$);
Expand Down Expand Up @@ -46,10 +48,10 @@ const CloudUserAvatar = (props: { type: 'CreatedBy' | 'UpdatedBy' }) => {
}
if (user) {
return (
<>
<Avatar url={user.avatarUrl || ''} name={user.name} size={20} />
<div className={userWrapper}>
<Avatar url={user.avatarUrl || ''} name={user.name} size={22} />
<span>{user.name}</span>
</>
</div>
);
}
return <NoRecordValue />;
Expand Down

0 comments on commit 3ca052c

Please sign in to comment.