From 7d105439f924f2923895ff7b3ca488eee092083b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 21 Feb 2019 09:41:53 +0100 Subject: [PATCH] Fixed scrollbar issue introduced in theme changes --- .../src/components/CustomScrollbar/CustomScrollbar.tsx | 8 ++++---- .../src/components/CustomScrollbar/_CustomScrollbar.scss | 9 ++++++++- public/app/core/components/Page/Page.tsx | 2 +- public/app/features/explore/Wrapper.tsx | 2 +- public/sass/_variables.dark.scss | 6 +++--- public/sass/_variables.light.scss | 2 +- public/sass/components/_footer.scss | 2 +- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx b/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx index 40f6c6c3c37..39bae62e28b 100644 --- a/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx +++ b/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx @@ -1,9 +1,10 @@ import React, { PureComponent } from 'react'; import _ from 'lodash'; +import classNames from 'classnames'; import Scrollbars from 'react-custom-scrollbars'; interface Props { - customClassName?: string; + className?: string; autoHide?: boolean; autoHideTimeout?: number; autoHideDuration?: number; @@ -21,7 +22,6 @@ interface Props { */ export class CustomScrollbar extends PureComponent { static defaultProps: Partial = { - customClassName: 'custom-scrollbars', autoHide: false, autoHideTimeout: 200, autoHideDuration: 200, @@ -60,7 +60,7 @@ export class CustomScrollbar extends PureComponent { render() { const { - customClassName, + className, children, autoHeightMax, autoHeightMin, @@ -75,7 +75,7 @@ export class CustomScrollbar extends PureComponent { return ( { const { buildInfo } = config; return (
- +
{this.props.children} diff --git a/public/app/features/explore/Wrapper.tsx b/public/app/features/explore/Wrapper.tsx index 35d09cfd9bb..add2ffed235 100644 --- a/public/app/features/explore/Wrapper.tsx +++ b/public/app/features/explore/Wrapper.tsx @@ -53,7 +53,7 @@ export class Wrapper extends Component { return (
- +
diff --git a/public/sass/_variables.dark.scss b/public/sass/_variables.dark.scss index 46b6c923f0a..e491df83ea4 100644 --- a/public/sass/_variables.dark.scss +++ b/public/sass/_variables.dark.scss @@ -144,9 +144,9 @@ $list-item-shadow: $card-shadow; $empty-list-cta-bg: $gray-blue; // Scrollbars -$scrollbarBackground: $dark-9; -$scrollbarBackground2: $dark-9; -$scrollbarBorder: $dark-10; +$scrollbarBackground: #404357; +$scrollbarBackground2: $dark-10; +$scrollbarBorder: black; // Tables // ------------------------- diff --git a/public/sass/_variables.light.scss b/public/sass/_variables.light.scss index 94c2134313f..ffc67a735f5 100644 --- a/public/sass/_variables.light.scss +++ b/public/sass/_variables.light.scss @@ -131,7 +131,7 @@ $empty-list-cta-bg: $gray-6; // Scrollbars $scrollbarBackground: $gray-4; $scrollbarBackground2: $gray-4; -$scrollbarBorder: $gray-3; +$scrollbarBorder: $gray-7; // Tables // ------------------------- diff --git a/public/sass/components/_footer.scss b/public/sass/components/_footer.scss index b5617f4e387..88e5b1521f3 100644 --- a/public/sass/components/_footer.scss +++ b/public/sass/components/_footer.scss @@ -42,7 +42,7 @@ display: none; } -.is-react .custom-scrollbars .footer { +.is-react .custom-scrollbar .footer { display: block; }