Skip to content

Commit

Permalink
update pattern creation modal in library
Browse files Browse the repository at this point in the history
  • Loading branch information
SaxonF authored and talldan committed Jun 28, 2023
1 parent 52d1b8d commit a5d7259
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/edit-site/src/components/create-pattern-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function CreatePatternModal( {
onError,
} ) {
const [ name, setName ] = useState( '' );
const [ syncType, setSyncType ] = useState( SYNC_TYPES.full );
const [ syncType, setSyncType ] = useState( SYNC_TYPES.unsynced );
const [ isSubmitting, setIsSubmitting ] = useState( false );

const onSyncChange = () => {
Expand Down Expand Up @@ -77,8 +77,6 @@ export default function CreatePatternModal( {
onRequestClose={ closeModal }
overlayClassName="edit-site-create-pattern-modal"
>
<p>{ __( 'Turn this block into a pattern to reuse later' ) }</p>

<form
onSubmit={ async ( event ) => {
event.preventDefault();
Expand All @@ -100,13 +98,11 @@ export default function CreatePatternModal( {
__nextHasNoMarginBottom
/>
<ToggleControl
label={ __( 'Synced' ) }
label={ __( 'Keep all pattern instances in sync' ) }
onChange={ onSyncChange }
help={
syncType === SYNC_TYPES.full
? __( 'Content is synced' )
: __( 'Content is not synced' )
}
help={ __(
'Editing the original pattern will also update anywhere the pattern is used.'
) }
checked={ syncType === SYNC_TYPES.full }
/>
<HStack justify="right">
Expand Down

0 comments on commit a5d7259

Please sign in to comment.