feat: tweak add new app connection dialog

This commit is contained in:
Ali BARIN
2021-12-16 23:27:09 +01:00
parent 3e8bae2ec3
commit 81c18ee37c
6 changed files with 22 additions and 9 deletions

View File

@@ -13,14 +13,13 @@ const inlineImgStyle: React.CSSProperties = {
};
export default function AppIcon(props: AppIconProps & AvatarProps) {
const { name, url, sx = {}, ...restProps } = props;
const color = url ? 'white' : props.color
const { name, url, color, sx = {}, ...restProps } = props;
return (
<Avatar
component="span"
variant="square"
sx={{ bgcolor: `#${color}`, display: 'inline-flex', width: 50, height: 50, ...sx }}
sx={{ bgcolor: color, display: 'inline-flex', width: 50, height: 50, ...sx }}
imgProps={{ style: inlineImgStyle }}
src={url}
alt={name}