Skip to content

Commit

Permalink
Some compatibility with default align/size fields
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Oct 3, 2020
1 parent c01be5d commit ca78de4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/BlockStyleWrapper/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ export default (props) => {
return (
<StyleWrapperEdit
{...props}
data={data?.styles || {}}
data={{
...data?.styles,
...(data.align ? { align: data.align } : {}),
...(data.size ? { size: data.size } : {}),
}}
choices={[]}
onChangeValue={(id, value) =>
onChangeBlock(block, {
...data,
...(id === 'align' ? { align: value } : {}),
...(id === 'size' ? { size: value } : {}),
styles: {
...data?.styles,
[id]: value,
Expand Down

0 comments on commit ca78de4

Please sign in to comment.