feat: add used app icons in FlowRow

This commit is contained in:
Ali BARIN
2022-07-31 16:13:07 +02:00
parent 15aaada3fe
commit 8c59bd664e
4 changed files with 48 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ type AppIconProps = {
name?: string;
url?: string;
color?: string;
variant?: AvatarProps['variant'];
};
const inlineImgStyle: React.CSSProperties = {
@@ -13,12 +14,12 @@ const inlineImgStyle: React.CSSProperties = {
};
export default function AppIcon(props: AppIconProps & AvatarProps): React.ReactElement {
const { name, url, color, sx = {}, ...restProps } = props;
const { name, url, color, sx = {}, variant = "square", ...restProps } = props;
return (
<Avatar
component="span"
variant="square"
variant={variant}
sx={{ bgcolor: color, display: 'flex', width: 50, height: 50, ...sx }}
imgProps={{ style: inlineImgStyle }}
src={url}