feat: add dynamic flow app icons
This commit is contained in:
@@ -14,7 +14,16 @@ const inlineImgStyle: React.CSSProperties = {
|
||||
};
|
||||
|
||||
export default function AppIcon(props: AppIconProps & AvatarProps): React.ReactElement {
|
||||
const { name, url, color, sx = {}, variant = "square", ...restProps } = props;
|
||||
const {
|
||||
name,
|
||||
url,
|
||||
color,
|
||||
sx = {},
|
||||
variant = "square",
|
||||
...restProps
|
||||
} = props;
|
||||
|
||||
const initialLetter = name?.[0];
|
||||
|
||||
return (
|
||||
<Avatar
|
||||
@@ -24,6 +33,7 @@ export default function AppIcon(props: AppIconProps & AvatarProps): React.ReactE
|
||||
imgProps={{ style: inlineImgStyle }}
|
||||
src={url}
|
||||
alt={name}
|
||||
children={initialLetter}
|
||||
{...restProps}
|
||||
/>
|
||||
);
|
||||
|
Reference in New Issue
Block a user