diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js index 590d1cdfa00e5a..f9261ebc06d43f 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js @@ -2,14 +2,21 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { brush } from '@wordpress/icons'; +import { useDispatch } from '@wordpress/data'; /** * Internal dependencies */ import SidebarNavigationScreen from '../sidebar-navigation-screen'; import StyleVariationsContainer from '../global-styles/style-variations-container'; +import { unlock } from '../../private-apis'; +import { store as editSiteStore } from '../../store'; +import SidebarButton from '../sidebar-button'; export default function SidebarNavigationScreenGlobalStyles() { + const { openGeneralSidebar } = useDispatch( editSiteStore ); + const { setCanvasMode } = unlock( useDispatch( editSiteStore ) ); return ( } + actions={ + { + // switch to edit mode. + setCanvasMode( 'edit' ); + // open global styles sidebar. + openGeneralSidebar( 'edit-site/global-styles' ); + } } + /> + } /> ); }