mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
add color picker tooltip
This commit is contained in:
parent
a779369185
commit
5a50bc80e3
2 changed files with 32 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Add table
Reference in a new issue