mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-23 15:12:28 +03:00
chore: adjust style of CloudUserAvatar (#8548)
close PD-1774 ![CleanShot 2024-10-18 at 17 59 52@2x](https://github.com/user-attachments/assets/ac73fa27-25ab-4136-9008-7abde4491f92)
This commit is contained in:
parent
675a010dfc
commit
3ca052c55f
@ -0,0 +1,5 @@
|
||||
import { style } from '@vanilla-extract/css';
|
||||
export const userWrapper = style({
|
||||
display: 'flex',
|
||||
gap: '8px',
|
||||
});
|
@ -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$);
|
||||
@ -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 />;
|
||||
|
Loading…
Reference in New Issue
Block a user