mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
618a846451
commit
49172ac2d3
5 changed files with 183 additions and 44 deletions
|
@ -233,6 +233,8 @@ export const actionChangeStrokeColor = register({
|
|||
setActive={(active) =>
|
||||
updateData({ openPopup: active ? "strokeColorPicker" : null })
|
||||
}
|
||||
elements={elements}
|
||||
appState={appState}
|
||||
/>
|
||||
</>
|
||||
),
|
||||
|
@ -273,6 +275,8 @@ export const actionChangeBackgroundColor = register({
|
|||
setActive={(active) =>
|
||||
updateData({ openPopup: active ? "backgroundColorPicker" : null })
|
||||
}
|
||||
elements={elements}
|
||||
appState={appState}
|
||||
/>
|
||||
</>
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue