Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/block/button-group/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const TOOLBAR_ALIGN_OPTIONS = ALIGN_OPTIONS.map( control => {
const ALIGNMENT_CONTROLS_DESKTOP = [
{
title: __( 'Horizontal', i18n ),
value: '',
value: 'horizontal',
},
{
title: __( 'Vertical', i18n ),
Expand Down Expand Up @@ -134,7 +134,7 @@ const Edit = props => {
] )

let contentAlignControls = null
if ( attributes.buttonAlign === '' ) {
if ( attributes.buttonAlign === 'horizontal' ) {
contentAlignControls = ALIGN_OPTIONS
}
if ( deviceType === 'Tablet' || deviceType === 'Mobile' ) {
Expand Down
5 changes: 3 additions & 2 deletions src/block/button-group/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ blockStyles.addBlockStyles( 'buttonAlign', [ {
valuePreCallback: value => {
if ( value === 'vertical' ) {
return 'column'
} else if ( value === 'horizontal' ) {
return 'row'
}

return 'row'
return value
},
}, {
renderIn: 'edit',
Expand Down
Loading