From 4bd00491bd4b8c7f8ad1e865df758dc32b1b8044 Mon Sep 17 00:00:00 2001 From: Lukas Siatka Date: Thu, 10 Oct 2019 21:53:02 +0200 Subject: [PATCH] Explore: updates clear all button to responsive button (#19719) * Explore: updates clear all button to responsive button * Explore: update toolbar icons alignment * Explore: adds responsive styles for explore icon alignment --- .../app/features/explore/ExploreToolbar.tsx | 14 +++--- .../app/features/explore/ResponsiveButton.tsx | 20 +++------ public/sass/pages/_explore.scss | 44 +++++++++++++++++++ 3 files changed, 60 insertions(+), 18 deletions(-) diff --git a/public/app/features/explore/ExploreToolbar.tsx b/public/app/features/explore/ExploreToolbar.tsx index 0cf01a8d5ca..b752e65e533 100644 --- a/public/app/features/explore/ExploreToolbar.tsx +++ b/public/app/features/explore/ExploreToolbar.tsx @@ -251,7 +251,7 @@ export class UnConnectedExploreToolbar extends PureComponent { )} {exploreId === 'left' && !splitted ? ( -
+
{
)} -
- +
+
{ const defaultProps = { iconSide: IconSide.left, @@ -28,19 +32,9 @@ export const ResponsiveButton = (props: Props) => { onClick={onClick} disabled={disabled || false} > - {iconClassName && iconSide === IconSide.left ? ( - <> - -   - - ) : null} - {!splitted ? title : ''} - {iconClassName && iconSide === IconSide.right ? ( - <> -   - - - ) : null} + {iconClassName && iconSide === IconSide.left ? : null} + {!splitted ? formatBtnTitle(title, iconSide) : ''} + {iconClassName && iconSide === IconSide.right ? : null} ); }; diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index df8c8b1d96c..3ed5735c942 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -1,9 +1,17 @@ .icon-margin-right { margin-right: 0.25em; + + @media only screen and (max-width: 1320px) { + margin-right: 0; + } } .icon-margin-left { margin-left: 0.25em; + + @media only screen and (max-width: 1320px) { + margin-left: 0; + } } .datasource-picker { @@ -126,6 +134,29 @@ } } +.explore-icon-align { + .navbar-button { + i { + position: relative; + top: -1px; + + @media only screen and (max-width: 1320px) { + margin: 0 -3px; + } + } + } +} + +.explore-toolbar.splitted { + .explore-icon-align { + .navbar-button { + i { + margin: 0 -3px; + } + } + } +} + .explore { display: flex; flex: 1 1 auto; @@ -221,6 +252,7 @@ from { color: $text-color-faint; } + to { color: $blue; } @@ -266,51 +298,63 @@ border-bottom: 2px solid $body-bg; height: 2em; } + .ReactTable .rt-thead.-header .rt-th { text-align: left; color: $blue; font-weight: $font-weight-semi-bold; } + .ReactTable .rt-thead .rt-td, .ReactTable .rt-thead .rt-th { padding: 0.45em 0 0.45em 1.1em; border-right: none; box-shadow: none; } + .ReactTable .rt-tbody .rt-td { padding: 0.45em 0 0.45em 1.1em; border-bottom: 2px solid $body-bg; border-right: 2px solid $body-bg; } + .ReactTable .rt-tbody .rt-td:last-child { border-right: none; } + .ReactTable .-pagination { border-top: none; box-shadow: none; margin-top: $space-sm; } + .ReactTable .-pagination .-btn { color: $blue; background: $list-item-bg; } + .ReactTable .-pagination input, .ReactTable .-pagination select { color: $input-color; background-color: $input-bg; } + .ReactTable .-loading { background: $input-bg; } + .ReactTable .-loading.-active { opacity: 0.8; } + .ReactTable .-loading > div { color: $input-color; } + .ReactTable .rt-tr .rt-td:last-child { text-align: right; } + .ReactTable .rt-noData { top: 60px; z-index: inherit;