0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

add color palette slider scss

This commit is contained in:
Juan de la Cruz 2016-11-29 15:01:20 +01:00
parent 3f1ae0feaa
commit bb28ab78d6
2 changed files with 17 additions and 8 deletions

View file

@ -85,6 +85,14 @@
.color-palette-content {
align-items: center;
display: flex;
overflow: hidden;
width: 100%;
}
.color-palette-inside {
align-items: center;
display: flex;
transition: all .6s ease;
width: 100%;
}

View file

@ -38,6 +38,7 @@
(st/emit! (uds/update-selected-shapes-stroke {:color color}))
(st/emit! (uds/update-selected-shapes-fill {:color color}))))]
[:div.color-palette-content
[:div.color-palette-inside
(for [hex-color colors
:let [rgb-vec (hex->rgb hex-color)
rgb-color (apply str "" (interpose ", " rgb-vec))]]
@ -45,7 +46,7 @@
:on-click #(select-color % hex-color)}
[:span.color {:style {:background hex-color}}]
[:span.color-text hex-color]
[:span.color-text rgb-color]])]))
[:span.color-text rgb-color]])]]))
(mx/defcs palette
{:mixins [mx/static mx/reactive (mx/local)]}