Files
grafana/public/app/angular/react2angular.ts
T

13 lines
413 B
TypeScript
Raw Normal View History

import { config } from '@grafana/runtime';
import coreModule from 'app/angular/core_module';
2019-02-05 17:04:48 +01:00
import { provideTheme } from 'app/core/utils/ConfigProvider';
export function react2AngularDirective(name: string, component: any, options: any) {
2017-12-19 16:06:54 +01:00
coreModule.directive(name, [
2017-12-20 12:33:33 +01:00
'reactDirective',
2021-01-20 07:59:48 +01:00
(reactDirective) => {
return reactDirective(provideTheme(component, config.theme2), options);
2017-12-20 12:33:33 +01:00
},
2017-12-19 16:06:54 +01:00
]);
}