diff --git a/resources/styles/partials/colorpicker.scss b/resources/styles/partials/colorpicker.scss index 19fafa09c..0decbc501 100644 --- a/resources/styles/partials/colorpicker.scss +++ b/resources/styles/partials/colorpicker.scss @@ -104,7 +104,6 @@ .color-data { align-items: center; display: flex; - margin-bottom: $x-small; position: relative; .color-info { @@ -123,3 +122,15 @@ color: $intense-ui-text; } } + +.colorpicker-tooltip { + background: $color-white; + border-radius: $br-small; + display: flex; + flex-direction: column; + left: 0; + padding: $small; + position: absolute; + top: -20px; + z-index: 11; +} diff --git a/src/uxbox/ui/workspace/sidebar/options.cljs b/src/uxbox/ui/workspace/sidebar/options.cljs index be90050c3..5b50e5ba5 100644 --- a/src/uxbox/ui/workspace/sidebar/options.cljs +++ b/src/uxbox/ui/workspace/sidebar/options.cljs @@ -119,27 +119,33 @@ ;; SLIDEBAR FOR ROTATION AND OPACITY [:span "Color"] - [:div.color-picker-small - (colorpicker - :theme :small - :value (:stroke shape "#000000") - :on-change #(change-stroke {:color %}))] - - [:div.row-flex - [:input.input-text - {:placeholder "#" - :type "text" - :value (:stroke shape "") - :on-change on-color-change}]] ;; NEW COLOR PICKER [:div.row-flex.color-data [:span.color-th] [:div.color-info [:span.type "#"] - [:span.number "F1F1F1"]]] + [:span.number "F1F1F1"]] - (recent-colors shape #(change-stroke {:color %})) + ;; COLOR PICKER TOOLTIP + [:div.colorpicker-tooltip + [:div.color-picker-small + (colorpicker + :theme :small + :value (:stroke shape "#000000") + :on-change #(change-stroke {:color %}))] + + [:div.row-flex + [:input.input-text + {:placeholder "#" + :type "text" + :value (:stroke shape "") + :on-change on-color-change}] + [:input.input-text + {:placeholder "RGB" + :type "text"}]] + + (recent-colors shape #(change-stroke {:color %}))]] ;; SLIDEBAR FOR ROTATION AND OPACITY [:span "Opacity"]