📁 Changed TDrive root folder (#16)

📁 Changed TDrive root folder
This commit is contained in:
Montassar Ghanmy
2023-04-11 10:04:29 +01:00
committed by GitHub
parent 3b3f67af07
commit e0615fa867
10548 changed files with 48 additions and 48 deletions
@@ -0,0 +1,5 @@
.avatar-component-container {
display: flex !important;
align-items: center;
justify-content: center;
}
@@ -0,0 +1,34 @@
import React from 'react';
import { Avatar, AvatarProps, Image } from 'antd';
import './avatar.scss';
type PropsType = {
url?: string;
size?: number;
shape?: AvatarProps['shape'];
borderRadius?: React.CSSProperties['borderRadius'];
fallback?: string;
onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
};
const AvatarComponent = ({ url, shape, size, borderRadius, fallback, onClick }: PropsType) => (
<div onClick={onClick}>
<Avatar
className="avatar-component-container"
shape={shape || 'square'}
size={size}
style={{ width: size || 24, height: size || 24 }}
src={
<Image
src={url?.length ? url : fallback}
style={{ width: size || 24, borderRadius: borderRadius || 4 }}
preview={false}
/>
}
/>
</div>
);
export default AvatarComponent;