mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added empty avatar placeholder
This commit is contained in:
parent
080d59858c
commit
8fc06a4819
6 changed files with 470 additions and 23 deletions
|
@ -1,5 +1,6 @@
|
|||
import React, { ChangeEvent, FC, useCallback } from 'react';
|
||||
|
||||
import { Avatar } from '~/components/common/Avatar';
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { ImagePresets } from '~/constants/urls';
|
||||
import { IFile } from '~/types';
|
||||
|
@ -36,14 +37,7 @@ const ProfileAvatar: FC<ProfileAvatarProps> = ({
|
|||
: undefined;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles.avatar}
|
||||
style={{
|
||||
backgroundImage,
|
||||
width: size,
|
||||
height: size,
|
||||
}}
|
||||
>
|
||||
<Avatar url={backgroundImage} size={size} className={styles.avatar}>
|
||||
{canEdit && <input type="file" onInput={onInputChange} />}
|
||||
{canEdit && (
|
||||
<Button
|
||||
|
@ -54,7 +48,7 @@ const ProfileAvatar: FC<ProfileAvatarProps> = ({
|
|||
className={styles.button}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Avatar>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue