diff --git a/packages/base-styles/_mixins.scss b/packages/base-styles/_mixins.scss index d8b145a2b13dd4..f8ea78b28b3cb3 100644 --- a/packages/base-styles/_mixins.scss +++ b/packages/base-styles/_mixins.scss @@ -221,22 +221,6 @@ * Styles that are reused verbatim in a few places */ -@mixin snackbar-container() { - position: fixed; - bottom: 24px; - left: 0; - right: 0; - padding-inline: 16px; - box-sizing: border-box; - display: flex; - flex-direction: column; - pointer-events: none; - - .components-snackbar { - margin-inline: auto; - } -} - // These are additional styles for all captions, when the theme opts in to block styles. @mixin caption-style() { margin-top: 0.5em; diff --git a/packages/boot/src/components/root/index.tsx b/packages/boot/src/components/root/index.tsx index 275e8e622d2259..21b7b19d19e4d5 100644 --- a/packages/boot/src/components/root/index.tsx +++ b/packages/boot/src/components/root/index.tsx @@ -14,9 +14,10 @@ import { __unstableAnimatePresence as AnimatePresence, Button, SlotFillProvider, + privateApis as componentsPrivateApis, } from '@wordpress/components'; import { menu } from '@wordpress/icons'; -import { useState, useEffect } from '@wordpress/element'; +import { createPortal, useState, useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Page } from '@wordpress/admin-ui'; @@ -33,6 +34,9 @@ import './style.scss'; import { UserThemeProvider } from '../user-theme-provider'; const { useLocation, useMatches, Outlet } = unlock( routePrivateApis ); +const { __experimentalGetOverlayLegacySlot: getOverlayLegacySlot } = unlock( + componentsPrivateApis +); export default function Root() { const matches = useMatches(); @@ -68,7 +72,10 @@ export default function Root() { } ) } > - + { createPortal( + , + getOverlayLegacySlot() + ) } { isMobileViewport && (