From 01f162c3a0d04205231cd2bf29ae5a18b5037d22 Mon Sep 17 00:00:00 2001 From: Alex P Date: Fri, 28 Apr 2017 16:30:18 -0700 Subject: [PATCH] SHIP IT --- ui/src/dashboards/components/Dashboard.js | 63 +++++++++---------- .../components/template-control-bar.scss | 58 ++++++++--------- 2 files changed, 57 insertions(+), 64 deletions(-) diff --git a/ui/src/dashboards/components/Dashboard.js b/ui/src/dashboards/components/Dashboard.js index f3eeed294..e40a850a4 100644 --- a/ui/src/dashboards/components/Dashboard.js +++ b/ui/src/dashboards/components/Dashboard.js @@ -51,40 +51,37 @@ const Dashboard = ({ )} >
-
-

Template Variables

- {templates.map(({id, values, tempVar}) => { - const items = values.map(value => ({...value, text: value.value})) - const selectedItem = items.find(item => item.selected) || items[0] - const selectedText = selectedItem && selectedItem.text +

Template Variables

+ + {templates.map(({id, values, tempVar}) => { + const items = values.map(value => ({...value, text: value.value})) + const selectedItem = items.find(item => item.selected) || items[0] + const selectedText = selectedItem && selectedItem.text - // TODO: change Dropdown to a MultiSelectDropdown, `selected` to - // the full array, and [item] to all `selected` values when we update - // this component to support multiple values - return ( -
- - onSelectTemplate(id, [item].map(x => omit(x, 'text')))} - /> - -
- ) - })} -
-
- -
+ // TODO: change Dropdown to a MultiSelectDropdown, `selected` to + // the full array, and [item] to all `selected` values when we update + // this component to support multiple values + return ( +
+ + onSelectTemplate(id, [item].map(x => omit(x, 'text')))} + /> + +
+ ) + })}
{cells.length ? div.btn.dropdown-toggle { - @include gradient-h($c-comet,$c-pool); + font-size: 12px; + font-family: $code-font; } .dropdown-menu { - @include gradient-h($c-amethyst,$c-ocean); - @include custom-scrollbar-round($c-ocean,$c-laser); + @include gradient-h($c-star,$c-pool); + @include custom-scrollbar-round($c-pool,$c-laser); > li > a { &, &:active {background-color: transparent !important;} + font-size: 12px; + font-family: $code-font; } > li { - &:hover {@include gradient-h($c-star,$c-ocean);} + &:hover {@include gradient-h($c-comet,$c-pool);} } } -} +} .template-control--label { + @include no-user-select(); order: 1; - height: 30px; - padding: 0 9px; + height: 18px; + padding: 0 8px; margin: 0; - font-size: 12px; + font-size: 11px; font-family: $code-font; color: $c-potassium; - line-height: 30px; - border-radius: $radius-small 0 0 $radius-small; - background-color: $g5-pepper; - // transition: - // background-color 0.25s ease, - // color 0.25s ease; -} -.dropdown.open + .template-control--label { - @include gradient-h($c-star,$c-comet); - color: $g20-white; + line-height: 18px; + border-radius: $radius-small $radius-small 0 0; + background-color: $g4-onyx; } \ No newline at end of file