33 */
44import ProControl from '../pro-control'
55import { ResetButton } from '../base-control2/reset-button'
6- import ControlSeparator from '../control-separator'
76import Button from '../button'
87import {
98 useBlockAttributesContext ,
@@ -26,6 +25,8 @@ import {
2625 Dashicon ,
2726 Popover ,
2827 PanelBody ,
28+ Flex ,
29+ FlexItem ,
2930} from '@wordpress/components'
3031import {
3132 Fragment ,
@@ -150,7 +151,6 @@ export const BlockStylesControl = props => {
150151 className = "ugb-block-styles-controls__block-style-button"
151152 size = "small"
152153 icon = "edit"
153- iconPosition = "right"
154154 iconSize = { 12 }
155155 onClick = { ( ) => {
156156 // Clicking this button when the popover is open also triggers the popover's `onClose`, so the popover will close automatically.
@@ -160,7 +160,7 @@ export const BlockStylesControl = props => {
160160 } }
161161 ref = { buttonRef }
162162 >
163- { `${ __ ( 'Block Style' , i18n ) } :` } < wbr /> { blockStyleLabel } { isModified && inBlockStyleOptions ? ` ( ${ __ ( 'Modified' , i18n ) } )` : '' }
163+ { `${ __ ( 'Block Style' , i18n ) } :` } < wbr /> { blockStyleLabel } { isModified && inBlockStyleOptions ? < span className = "stk-panel-modified-indicator stk--visible" > </ span > : '' }
164164
165165 </ Button >
166166 < ResetButton
@@ -196,6 +196,7 @@ export const BlockStylesControl = props => {
196196 } }
197197 anchor = { buttonRef . current }
198198 offset = { 8 }
199+ placement = "left"
199200 >
200201 < PanelBody >
201202 < h2 className = "components-panel__body-title" > { __ ( 'Block Styles' , i18n ) } </ h2 >
@@ -276,22 +277,24 @@ const SaveUpdateButtons = props => {
276277 }
277278
278279 return ( < >
279- < ControlSeparator style = { { width : '100% !important' , margin : '0 auto !important' } } />
280- < ul >
281- < UpdateButton
282- blockStyle = { blockStyle }
283- inOptions = { inOptions }
284- isModified = { isModified }
285- setOpenSaveModal = { setOpenSaveModal }
286- />
287- < li >
288- < Button onClick = { ( ) => onAddBlockStyle ( ) } >
289- < span className = "ugb-block-styles-controls__action" >
290- { __ ( 'Add new block style' , i18n ) }
291- { ! isPro && < span className = "stk-pulsating-circle" role = "presentation" /> }
292- </ span >
280+ < Flex style = { { marginTop : '24px' } } >
281+ < FlexItem >
282+ < UpdateButton
283+ blockStyle = { blockStyle }
284+ inOptions = { inOptions }
285+ isModified = { isModified }
286+ setOpenSaveModal = { setOpenSaveModal }
287+ />
288+ </ FlexItem >
289+ < FlexItem >
290+ < Button
291+ variant = "primary"
292+ onClick = { ( ) => onAddBlockStyle ( ) }
293+ >
294+ { __ ( 'Save as New Style' , i18n ) }
295+ { ! isPro && < span className = "stk-pulsating-circle" role = "presentation" /> }
293296 </ Button >
294- </ li >
295- </ ul >
297+ </ FlexItem >
298+ </ Flex >
296299 </ > )
297300}
0 commit comments