feat: support custom colors 🎉 (#4843)
* feat: support custom colors 🎉 * remove canvasBackground * fix tests * Remove custom color when elements deleted * persist custom color across sessions * Choose 5 latest custom colors when populating from elements * fix tests * styling * don't use up/down arrow for custom colors * Always push latest color to the begining * don't check if valid in custom color * calculate custom colors on color picker open * revert unnecessary changes * remove newlines * simplify state * tweak label * fix custom color shortcuts throwing if color not exists * fix * early return Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
top: -11px;
|
||||
}
|
||||
|
||||
.color-picker-content {
|
||||
.color-picker-content--default {
|
||||
padding: 0.5rem;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, auto);
|
||||
@ -59,6 +59,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.color-picker-content--canvas {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0.25rem;
|
||||
|
||||
&-title {
|
||||
color: $oc-gray-6;
|
||||
font-size: 12px;
|
||||
padding: 0 0.25rem;
|
||||
}
|
||||
|
||||
&-colors {
|
||||
padding: 0.5rem 0;
|
||||
|
||||
.color-picker-swatch {
|
||||
margin: 0 0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color-picker-content .color-input-container {
|
||||
grid-column: 1 / span 5;
|
||||
}
|
||||
|
Reference in New Issue
Block a user