diff --git a/packages/grafana-data/src/themes/types.ts b/packages/grafana-data/src/themes/types.ts index 404d8e89220..b4fb4ff9b3d 100644 --- a/packages/grafana-data/src/themes/types.ts +++ b/packages/grafana-data/src/themes/types.ts @@ -32,7 +32,7 @@ export interface GrafanaTheme2 { /** @deprecated Will be removed in a future version */ v1: GrafanaTheme; /** feature flags that might impact component looks */ - flags: { topnav?: boolean }; + flags: {}; } /** @alpha */ diff --git a/packages/grafana-runtime/src/config.ts b/packages/grafana-runtime/src/config.ts index d1cf3406009..2ef92f24027 100644 --- a/packages/grafana-runtime/src/config.ts +++ b/packages/grafana-runtime/src/config.ts @@ -204,9 +204,6 @@ export class GrafanaBootConfig implements GrafanaConfig { this.theme2 = getThemeById(this.bootData.user.theme); this.bootData.user.lightTheme = this.theme2.isLight; this.theme = this.theme2.v1; - - // Special feature toggle that impact theme/component looks - this.theme2.flags.topnav = this.featureToggles.topnav; } } diff --git a/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx b/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx index 453db10896e..a93a6b89eb4 100644 --- a/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx +++ b/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx @@ -139,17 +139,6 @@ const getStyles = (theme: GrafanaTheme2) => { } `; - const defaultTopNav = css` - color: ${theme.colors.text.secondary}; - background: transparent; - border: 1px solid transparent; - - &:hover { - color: ${theme.colors.text.primary}; - background: ${theme.colors.background.secondary}; - } - `; - return { button: css` label: toolbar-button; @@ -195,7 +184,16 @@ const getStyles = (theme: GrafanaTheme2) => { } } `, - default: defaultTopNav, + default: css` + color: ${theme.colors.text.secondary}; + background: transparent; + border: 1px solid transparent; + + &:hover { + color: ${theme.colors.text.primary}; + background: ${theme.colors.background.secondary}; + } + `, canvas: defaultOld, active: css` color: ${theme.v1.palette.orangeDark}; diff --git a/public/app/core/services/theme.ts b/public/app/core/services/theme.ts index 66161fafad2..b19b04f3242 100644 --- a/public/app/core/services/theme.ts +++ b/public/app/core/services/theme.ts @@ -12,9 +12,6 @@ export async function changeTheme(themeId: string, runtimeOnly?: boolean) { const newTheme = getThemeById(themeId); - // Special feature toggle that impact theme/component looks - newTheme.flags.topnav = config.featureToggles.topnav; - appEvents.publish(new ThemeChangedEvent(newTheme)); // Add css file for new theme