Transformations: Refactor to use single registry for transformations (#23502)

* Use single registry for transformations

* Fix transformations tests

* Added documentation comments and minor refactor

* Added documentation comments and minor refactor
Minor misunderstanding between me and Typescript. We should be good friends back now.

* Fix registry import
This commit is contained in:
Dominik Prokop
2020-04-10 19:21:49 +02:00
committed by GitHub
parent 7f61f3cc43
commit 58257a95a3
29 changed files with 269 additions and 225 deletions

View File

@ -25,15 +25,13 @@ const buttonVariantStyles = (from: string, to: string, textColor: string) => css
const getPropertiesForVariant = (theme: GrafanaTheme, variant: ButtonVariant) => {
switch (variant) {
case 'secondary':
const from = selectThemeVariant({ light: theme.colors.gray7, dark: theme.colors.gray15 }, theme.type) as string;
const from = selectThemeVariant({ light: theme.colors.gray7, dark: theme.colors.gray10 }, theme.type) as string;
const to = selectThemeVariant(
{
light: tinycolor(from)
.darken(5)
.toString(),
dark: tinycolor(from)
.lighten(4)
.toString(),
dark: theme.colors.gray05,
},
theme.type
) as string;