mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Render shape action on tool selected (#448)
This commit is contained in:
parent
5563dd30d7
commit
bbabf33d78
2 changed files with 19 additions and 10 deletions
|
@ -35,7 +35,10 @@ export const actionChangeStrokeColor: Action = {
|
|||
<h5>Stroke</h5>
|
||||
<ColorPicker
|
||||
type="elementStroke"
|
||||
color={getSelectedAttribute(elements, element => element.strokeColor)}
|
||||
color={
|
||||
getSelectedAttribute(elements, element => element.strokeColor) ||
|
||||
appState.currentItemStrokeColor
|
||||
}
|
||||
onChange={updateData}
|
||||
/>
|
||||
</>
|
||||
|
@ -54,15 +57,15 @@ export const actionChangeBackgroundColor: Action = {
|
|||
appState: { ...appState, currentItemBackgroundColor: value }
|
||||
};
|
||||
},
|
||||
PanelComponent: ({ elements, updateData }) => (
|
||||
PanelComponent: ({ elements, appState, updateData }) => (
|
||||
<>
|
||||
<h5>Background</h5>
|
||||
<ColorPicker
|
||||
type="elementBackground"
|
||||
color={getSelectedAttribute(
|
||||
elements,
|
||||
element => element.backgroundColor
|
||||
)}
|
||||
color={
|
||||
getSelectedAttribute(elements, element => element.backgroundColor) ||
|
||||
appState.currentItemBackgroundColor
|
||||
}
|
||||
onChange={updateData}
|
||||
/>
|
||||
</>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue