mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added config provider to be able to access config easily from react components
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import coreModule from 'app/core/core_module';
|
||||
import { provideConfig } from 'app/core/utils/ConfigProvider';
|
||||
|
||||
export function react2AngularDirective(name: string, component: any, options: any) {
|
||||
coreModule.directive(name, [
|
||||
'reactDirective',
|
||||
reactDirective => {
|
||||
return reactDirective(component, options);
|
||||
return reactDirective(provideConfig(component), options);
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user