( triggerType: string )
| 183 | } |
| 184 | |
| 185 | function getTriggerIcon( |
| 186 | triggerType: string |
| 187 | ): React.ComponentType<{ className?: string }> | undefined { |
| 188 | if ((CORE_TRIGGER_TYPES as readonly string[]).includes(triggerType)) return undefined |
| 189 | const block = getBlock(triggerType) |
| 190 | if (!block?.icon) return undefined |
| 191 | const BlockIcon = block.icon |
| 192 | const TriggerIcon = ({ className }: { className?: string }) => ( |
| 193 | <BlockIcon className={cn(className, 'flex-shrink-0')} style={{ width: 12, height: 12 }} /> |
| 194 | ) |
| 195 | TriggerIcon.displayName = `TriggerIcon(${triggerType})` |
| 196 | return TriggerIcon |
| 197 | } |
| 198 | |
| 199 | function SpinningRefreshCw(props: React.SVGProps<SVGSVGElement>) { |
| 200 | return <RefreshCw {...props} animate /> |
no test coverage detected