mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 17:22:20 +08:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user