grafana/public/app/angular/react2angular.ts
Torkel Ödegaard 27f66a6df9
Angular: Move coreModule to app/angular and isolate angular usage more (#41433)
* moving coreModule to app/angular and isolating it more

* fixed ts issue
2021-11-09 08:37:16 +01:00

12 lines
355 B
TypeScript

import coreModule from 'app/angular/core_module';
import { provideTheme } from 'app/core/utils/ConfigProvider';
export function react2AngularDirective(name: string, component: any, options: any) {
coreModule.directive(name, [
'reactDirective',
(reactDirective) => {
return reactDirective(provideTheme(component), options);
},
]);
}