Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve text and design of the block removal warnings #54715

Closed
wants to merge 10 commits into from
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,30 @@ export function BlockRemovalWarningModal( { rules } ) {
onRequestClose={ clearBlockRemovalPrompt }
>
{ blockNamesForPrompt.length === 1 ? (
<p>{ rules[ blockNamesForPrompt[ 0 ] ] }</p>
<p>
{ rules[ blockNamesForPrompt[ 0 ] ] }{ ' ' }
scruffian marked this conversation as resolved.
Show resolved Hide resolved
{ __(
"Only proceed to remove this block if you're absolutely sure of what you're doing."
scruffian marked this conversation as resolved.
Show resolved Hide resolved
) }{ ' ' }
scruffian marked this conversation as resolved.
Show resolved Hide resolved
</p>
) : (
<ul style={ { listStyleType: 'disc', paddingLeft: '1rem' } }>
{ blockNamesForPrompt.map( ( name ) => (
<li key={ name }>{ rules[ name ] }</li>
) ) }
</ul>
<>
<ul
style={ { listStyleType: 'disc', paddingLeft: '1rem' } }
>
{ blockNamesForPrompt.map( ( name ) => (
<li key={ name }>{ rules[ name ] }</li>
) ) }
</ul>
scruffian marked this conversation as resolved.
Show resolved Hide resolved
<p>
{ ' ' }
{ __(
"Only proceed to remove these blocks if you're absolutely sure of what you're doing."
scruffian marked this conversation as resolved.
Show resolved Hide resolved
) }
</p>
</>
) }
<p>
{ blockNamesForPrompt.length > 1
? __( 'Removing these blocks is not advised.' )
: __( 'Removing this block is not advised.' ) }
</p>

<HStack justify="right">
<Button variant="tertiary" onClick={ clearBlockRemovalPrompt }>
{ __( 'Cancel' ) }
Expand Down
Loading