grafana/public/app/angular/react2angular.ts
Torkel Ödegaard 7947629f82
TopNav: Make dashboard toolbar actions work in new top nav (#51950)
* Initial work on new toolbar button

* Minor step

* Small progress

* Minor progress

* Minor fix

* removed console.log

* Removing stuff we don't need yet
2022-07-14 20:34:00 +02:00

13 lines
413 B
TypeScript

import { config } from '@grafana/runtime';
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, config.theme2), options);
},
]);
}