Theme: Deprecate selectThemeVariant util function (#28223)

This commit is contained in:
Torkel Ödegaard 2020-10-13 18:02:07 +02:00 committed by GitHub
parent 597aeff493
commit 558ce5fd7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,9 @@ import { GrafanaThemeType } from '@grafana/data';
type VariantDescriptor = { [key in GrafanaThemeType]: string | number };
/**
* @deprecated use theme.isLight ? or theme.isDark instead
*/
export const selectThemeVariant = (variants: VariantDescriptor, currentTheme?: GrafanaThemeType) => {
return variants[currentTheme || GrafanaThemeType.Dark];
};