kibana/x-pack/plugins/observability/public/hooks/use_chart_theme.tsx
Dario Gieselaar 520d348bf8
[APM] Service inventory redesign (#76744)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 16:10:04 +02:00

13 lines
533 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EUI_CHARTS_THEME_DARK, EUI_CHARTS_THEME_LIGHT } from '@elastic/eui/dist/eui_charts_theme';
import { useTheme } from './use_theme';
export function useChartTheme() {
const theme = useTheme();
return theme.darkMode ? EUI_CHARTS_THEME_DARK.theme : EUI_CHARTS_THEME_LIGHT.theme;
}