1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fixed image upload button at avatar

This commit is contained in:
Fedor Katurov 2022-01-11 11:37:33 +07:00
parent d31c18b06d
commit a454b16fc9
3 changed files with 6 additions and 37 deletions

View file

@ -4,6 +4,7 @@ import { getURL } from '~/utils/dom';
import { PRESETS } from '~/constants/urls';
import { Icon } from '~/components/input/Icon';
import { IFile } from '~/types';
import { Button } from '~/components/input/Button';
export interface ProfileAvatarProps {
canEdit: boolean;
@ -33,11 +34,7 @@ const ProfileAvatar: FC<ProfileAvatarProps> = ({ photo, onChangePhoto, canEdit }
}}
>
{canEdit && <input type="file" onInput={onInputChange} />}
{canEdit && (
<div className={styles.can_edit}>
<Icon icon="photo_add" />
</div>
)}
{canEdit && <Button iconLeft="photo_add" round iconOnly className={styles.can_edit} />}
</div>
);
};