@@ -33,7 +33,7 @@ import { makeStyleSchema, getStyle } from '../Styles';
3333
3434import tuneSVG from '@plone/volto/icons/column.svg' ;
3535import upSVG from '@plone/volto/icons/up.svg' ;
36-
36+ import eraserSVG from './icons/eraser.svg' ;
3737import '../less/columns.less' ;
3838
3939const messages = defineMessages ( {
@@ -175,6 +175,25 @@ class ColumnsBlockEdit extends React.Component {
175175 }
176176 } ;
177177
178+ deleteColumnStyle = ( ) => {
179+ const colId = this . state . activeColumn ;
180+ const { onChangeBlock, block, data } = this . props ;
181+ const coldata = data . data ;
182+ onChangeBlock ( block , {
183+ ...data ,
184+ data : {
185+ ...coldata ,
186+ blocks : {
187+ ...coldata . blocks ,
188+ [ colId ] : {
189+ ...coldata . blocks ?. [ colId ] ,
190+ settings : { } ,
191+ } ,
192+ } ,
193+ } ,
194+ } ) ;
195+ } ;
196+
178197 onSelectBlock = (
179198 id ,
180199 colId ,
@@ -498,14 +517,29 @@ class ColumnsBlockEdit extends React.Component {
498517 < SidebarPortal selected = { selected } >
499518 { this . state . activeColumn ? (
500519 < >
501- < Segment >
520+ < Segment
521+ style = { {
522+ display : 'flex' ,
523+ justifyContent : 'space-between' ,
524+ } }
525+ >
502526 < Button onClick = { ( ) => this . setState ( { activeColumn : null } ) } >
503527 < Icon name = { upSVG } size = "14px" />
504528 < FormattedMessage
505529 id = "Edit parent columns block"
506530 defaultMessage = "Edit parent columns block"
507531 />
508532 </ Button >
533+ < button
534+ onClick = { this . deleteColumnStyle }
535+ style = { { cursor : 'pointer' } }
536+ >
537+ < Icon
538+ name = { eraserSVG }
539+ size = "24px"
540+ title = "Clear column style"
541+ />
542+ </ button >
509543 </ Segment >
510544 < BlockDataForm
511545 schema = { ColumnSchema }
0 commit comments