0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 21:09:00 -05:00

add color picker tooltip

This commit is contained in:
elhombretecla 2016-04-23 12:19:46 +02:00 committed by Andrey Antukh
parent a779369185
commit 5a50bc80e3
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
2 changed files with 32 additions and 15 deletions

View file

@ -104,7 +104,6 @@
.color-data { .color-data {
align-items: center; align-items: center;
display: flex; display: flex;
margin-bottom: $x-small;
position: relative; position: relative;
.color-info { .color-info {
@ -123,3 +122,15 @@
color: $intense-ui-text; 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;
}

View file

@ -119,27 +119,33 @@
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Color"] [: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 ;; NEW COLOR PICKER
[:div.row-flex.color-data [:div.row-flex.color-data
[:span.color-th] [:span.color-th]
[:div.color-info [:div.color-info
[:span.type "#"] [: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 ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Opacity"] [:span "Opacity"]