Skip to content

Commit

Permalink
Use a warning notice for the compatibility warning
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Feb 24, 2025
1 parent 3443b65 commit d497b8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
import { useMemo, useState } from '@wordpress/element';
import { privateApis as routerPrivateApis } from '@wordpress/router';
import { useViewportMatch } from '@wordpress/compose';
import { Button } from '@wordpress/components';
import { Button, Notice } from '@wordpress/components';
import { addQueryArgs, removeQueryArgs } from '@wordpress/url';
import { seen } from '@wordpress/icons';
import { useSelect } from '@wordpress/data';
Expand Down Expand Up @@ -82,11 +82,11 @@ export default function GlobalStylesUIWrapper() {

if ( ! isBlockBasedTheme ) {
return (
<p className="edit-site-layout__area__unsupported">
<Notice status="warning" isDismissible={ false }>
{ __(
'The theme you are currently using is not compatible with the Site Editor.'
) }
</p>
</Notice>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { useEntityRecord, store as coreStore } from '@wordpress/core-data';
import { Spinner } from '@wordpress/components';
import { Spinner, Notice } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { decodeEntities } from '@wordpress/html-entities';
Expand Down Expand Up @@ -68,11 +68,11 @@ export default function SidebarNavigationScreenNavigationMenu( { backPath } ) {

if ( ! isBlockBasedTheme ) {
return (
<p className="edit-site-layout__area__unsupported">
<Notice status="warning" isDismissible={ false }>
{ __(
'The theme you are currently using is not compatible with the Site Editor.'
) }
</p>
</Notice>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { decodeEntities } from '@wordpress/html-entities';
import {
__experimentalItemGroup as ItemGroup,
Spinner,
Notice,
} from '@wordpress/components';
import { navigation } from '@wordpress/icons';

Expand Down Expand Up @@ -89,11 +90,11 @@ export default function SidebarNavigationScreenNavigationMenus( { backPath } ) {

if ( ! isBlockBasedTheme ) {
return (
<p className="edit-site-layout__area__unsupported">
<Notice status="warning" isDismissible={ false }>
{ __(
'The theme you are currently using is not compatible with the Site Editor.'
) }
</p>
</Notice>
);
}

Expand Down

0 comments on commit d497b8d

Please sign in to comment.