Skip to content

Commit

Permalink
Site Editor: use EditorNotices component for notices (#31303)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecoder authored Apr 30, 2021
1 parent eb4a5e7 commit 04c7c76
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 36 deletions.
5 changes: 3 additions & 2 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ import {
store as interfaceStore,
} from '@wordpress/interface';
import {
EditorNotices,
EntitiesSavedStates,
UnsavedChangesWarning,
store as editorStore,
} from '@wordpress/editor';
import { __ } from '@wordpress/i18n';
import { PluginArea } from '@wordpress/plugins';

/**
* Internal dependencies
*/
import Notices from '../notices';
import Header from '../header';
import { SidebarComplementaryAreaFills } from '../sidebar';
import BlockEditor from '../block-editor';
Expand Down Expand Up @@ -209,7 +210,7 @@ function Editor( { initialSettings } ) {
}
content={
<>
<Notices />
<EditorNotices />
{ template && (
<BlockEditor
setIsInserterOpen={
Expand Down
10 changes: 10 additions & 0 deletions packages/edit-site/src/components/editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@
background-color: $white;
}
}

// Adjust the position of the notices
.edit-site .components-editor-notices__snackbar {
position: fixed;
right: 0;
bottom: 40px;
padding-left: 16px;
padding-right: 16px;
}
@include editor-left(".edit-site .components-editor-notices__snackbar")
24 changes: 0 additions & 24 deletions packages/edit-site/src/components/notices/index.js

This file was deleted.

9 changes: 0 additions & 9 deletions packages/edit-site/src/components/notices/style.scss

This file was deleted.

1 change: 0 additions & 1 deletion packages/edit-site/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
@import "./components/header/more-menu/style.scss";
@import "./components/navigation-sidebar/navigation-toggle/style.scss";
@import "./components/navigation-sidebar/navigation-panel/style.scss";
@import "./components/notices/style.scss";
@import "./components/sidebar/style.scss";
@import "./components/sidebar/settings-header/style.scss";
@import "./components/sidebar/template-card/style.scss";
Expand Down

0 comments on commit 04c7c76

Please sign in to comment.