| 
									
										
										
										
											2022-07-15 02:34:00 +08:00
										 |  |  | import { config } from '@grafana/runtime'; | 
					
						
							| 
									
										
										
										
											2021-11-09 15:37:16 +08:00
										 |  |  | import coreModule from 'app/angular/core_module'; | 
					
						
							| 
									
										
										
										
											2019-02-06 00:04:48 +08:00
										 |  |  | import { provideTheme } from 'app/core/utils/ConfigProvider'; | 
					
						
							| 
									
										
										
										
											2017-10-17 16:51:42 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-21 15:39:31 +08:00
										 |  |  | export function react2AngularDirective(name: string, component: any, options: any) { | 
					
						
							| 
									
										
										
										
											2017-12-19 23:06:54 +08:00
										 |  |  |   coreModule.directive(name, [ | 
					
						
							| 
									
										
										
										
											2017-12-20 19:33:33 +08:00
										 |  |  |     'reactDirective', | 
					
						
							| 
									
										
										
										
											2021-01-20 14:59:48 +08:00
										 |  |  |     (reactDirective) => { | 
					
						
							| 
									
										
										
										
											2022-07-15 02:34:00 +08:00
										 |  |  |       return reactDirective(provideTheme(component, config.theme2), options); | 
					
						
							| 
									
										
										
										
											2017-12-20 19:33:33 +08:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2017-12-19 23:06:54 +08:00
										 |  |  |   ]); | 
					
						
							| 
									
										
										
										
											2017-10-17 16:51:42 +08:00
										 |  |  | } |