diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap index eb61c639d81..1f1f4182125 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap +++ b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap @@ -136,6 +136,7 @@ exports[`Render should render with base threshold 1`] = ` "linkHover": "#ffffff", "online": "#299c46", "orange": "#eb7b18", + "orangeDark": "#ff780A", "pageBg": "#161719", "purple": "#9933cc", "queryGreen": "#74e680", @@ -297,6 +298,7 @@ exports[`Render should render with base threshold 1`] = ` "linkHover": "#ffffff", "online": "#299c46", "orange": "#eb7b18", + "orangeDark": "#ff780A", "pageBg": "#161719", "purple": "#9933cc", "queryGreen": "#74e680", diff --git a/packages/grafana-ui/src/themes/_variables.dark.scss.tmpl.ts b/packages/grafana-ui/src/themes/_variables.dark.scss.tmpl.ts index 368ad8a3c8f..6dbd34473dc 100644 --- a/packages/grafana-ui/src/themes/_variables.dark.scss.tmpl.ts +++ b/packages/grafana-ui/src/themes/_variables.dark.scss.tmpl.ts @@ -20,6 +20,7 @@ $red-base: ${theme.colors.redBase}; $red-shade: ${theme.colors.redShade}; $green-base: ${theme.colors.greenBase}; $green-shade: ${theme.colors.greenShade}; +$orange-dark: ${theme.colors.orangeDark}; // Grays // ------------------------- diff --git a/packages/grafana-ui/src/themes/_variables.light.scss.tmpl.ts b/packages/grafana-ui/src/themes/_variables.light.scss.tmpl.ts index 972565f0152..79293e2ebdb 100644 --- a/packages/grafana-ui/src/themes/_variables.light.scss.tmpl.ts +++ b/packages/grafana-ui/src/themes/_variables.light.scss.tmpl.ts @@ -20,6 +20,7 @@ $red-base: ${theme.colors.redBase}; $red-shade: ${theme.colors.redShade}; $green-base: ${theme.colors.greenBase}; $green-shade: ${theme.colors.greenShade}; +$orange-dark: ${theme.colors.orangeDark}; // Grays // ------------------------- diff --git a/packages/grafana-ui/src/themes/dark.ts b/packages/grafana-ui/src/themes/dark.ts index 9bbe3aef04e..eca7c5b7488 100644 --- a/packages/grafana-ui/src/themes/dark.ts +++ b/packages/grafana-ui/src/themes/dark.ts @@ -36,6 +36,7 @@ const basicColors = { purple: '#9933cc', variable: '#32d1df', orange: '#eb7b18', + orangeDark: '#ff780A', }; const darkTheme: GrafanaTheme = { diff --git a/packages/grafana-ui/src/themes/light.ts b/packages/grafana-ui/src/themes/light.ts index e87bf744f95..b47f6a26929 100644 --- a/packages/grafana-ui/src/themes/light.ts +++ b/packages/grafana-ui/src/themes/light.ts @@ -36,6 +36,7 @@ const basicColors = { purple: '#9954bb', variable: '#007580', orange: '#ff7941', + orangeDark: '#ed5700', }; const lightTheme: GrafanaTheme = { diff --git a/packages/grafana-ui/src/types/theme.ts b/packages/grafana-ui/src/types/theme.ts index 23857cc9c34..9ad8bcd57c8 100644 --- a/packages/grafana-ui/src/types/theme.ts +++ b/packages/grafana-ui/src/types/theme.ts @@ -135,6 +135,7 @@ export interface GrafanaTheme extends GrafanaThemeCommons { purple: string; variable: string; orange: string; + orangeDark: string; queryRed: string; queryGreen: string; queryPurple: string; diff --git a/public/app/features/explore/LiveTailButton.tsx b/public/app/features/explore/LiveTailButton.tsx index 06b8ef996cf..dab4b210af4 100644 --- a/public/app/features/explore/LiveTailButton.tsx +++ b/public/app/features/explore/LiveTailButton.tsx @@ -5,14 +5,13 @@ import memoizeOne from 'memoize-one'; import tinycolor from 'tinycolor2'; import { CSSTransition } from 'react-transition-group'; -import { GrafanaTheme, GrafanaThemeType, useTheme } from '@grafana/ui'; +import { GrafanaTheme, useTheme } from '@grafana/ui'; const getStyles = memoizeOne((theme: GrafanaTheme) => { - const orange = theme.type === GrafanaThemeType.Dark ? '#FF780A' : '#ED5700'; - const orangeLighter = tinycolor(orange) + const orangeLighter = tinycolor(theme.colors.orangeDark) .lighten(10) .toString(); - const pulseTextColor = tinycolor(orange) + const pulseTextColor = tinycolor(theme.colors.orangeDark) .desaturate(90) .toString(); @@ -28,12 +27,12 @@ const getStyles = memoizeOne((theme: GrafanaTheme) => { `, isLive: css` label: isLive; - border-color: ${orange}; - color: ${orange}; + border-color: ${theme.colors.orangeDark}; + color: ${theme.colors.orangeDark}; background: transparent; &:focus { - border-color: ${orange}; - color: ${orange}; + border-color: ${theme.colors.orangeDark}; + color: ${theme.colors.orangeDark}; } &:active, &:hover { @@ -43,11 +42,11 @@ const getStyles = memoizeOne((theme: GrafanaTheme) => { `, isPaused: css` label: isPaused; - border-color: ${orange}; + border-color: ${theme.colors.orangeDark}; background: transparent; animation: pulse 3s ease-out 0s infinite normal forwards; &:focus { - border-color: ${orange}; + border-color: ${theme.colors.orangeDark}; } &:active, &:hover { @@ -58,7 +57,7 @@ const getStyles = memoizeOne((theme: GrafanaTheme) => { color: ${pulseTextColor}; } 50% { - color: ${orange}; + color: ${theme.colors.orangeDark}; } 100% { color: ${pulseTextColor};