| 15 | * (e.g. Issue Linking, Stacktrace Linking) |
| 16 | */ |
| 17 | export function SentryAppComponentIcon({sentryAppComponent, size = 20}: Props) { |
| 18 | const selectedAvatar = sentryAppComponent.sentryApp?.avatars?.find( |
| 19 | ({color}) => color === false |
| 20 | ); |
| 21 | const isDefault = selectedAvatar?.avatarType !== 'upload'; |
| 22 | const isDisabled = Boolean(sentryAppComponent.error); |
| 23 | |
| 24 | return ( |
| 25 | <SentryAppAvatarWrapper |
| 26 | isDark={ConfigStore.get('theme') === 'dark'} |
| 27 | isDefault={isDefault} |
| 28 | isDisabled={isDisabled} |
| 29 | > |
| 30 | <SentryAppAvatar |
| 31 | sentryApp={sentryAppComponent.sentryApp} |
| 32 | size={size} |
| 33 | isColor={false} |
| 34 | /> |
| 35 | </SentryAppAvatarWrapper> |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | const SentryAppAvatarWrapper = styled('span')<{ |
| 40 | isDark: boolean; |