feat: show empty active color if no common color (#9506)

This commit is contained in:
David Luzar
2025-05-11 15:07:57 +02:00
committed by GitHub
parent 51dbd4831b
commit c4c064982f
13 changed files with 193 additions and 155 deletions

View File

@@ -333,7 +333,8 @@ export const actionChangeStrokeColor = register({
app,
(element) => element.strokeColor,
true,
appState.currentItemStrokeColor,
(hasSelection) =>
!hasSelection ? appState.currentItemStrokeColor : null,
)}
onChange={(color) => updateData({ currentItemStrokeColor: color })}
elements={elements}
@@ -379,7 +380,8 @@ export const actionChangeBackgroundColor = register({
app,
(element) => element.backgroundColor,
true,
appState.currentItemBackgroundColor,
(hasSelection) =>
!hasSelection ? appState.currentItemBackgroundColor : null,
)}
onChange={(color) => updateData({ currentItemBackgroundColor: color })}
elements={elements}