kollapsminoriteten/wp-content/plugins/jetpack/modules/search/customberg/index.jsx

30 lines
609 B
React
Raw Normal View History

2021-08-17 08:33:07 +02:00
/**
2021-09-07 21:40:48 +02:00
* WordPress dependencies
2021-08-17 08:33:07 +02:00
*/
2021-09-07 21:40:48 +02:00
import { render } from '@wordpress/element';
2021-08-17 08:33:07 +02:00
/**
2021-09-07 21:40:48 +02:00
* Internal dependencies
2021-08-17 08:33:07 +02:00
*/
2021-09-07 21:40:48 +02:00
import Layout from './components/layout';
import './styles.scss';
2021-08-17 08:33:07 +02:00
/**
* Collapses wp-admin's sidebar menu for additional space.
*/
function collapseWpAdminSidebar() {
document.body.classList.add( 'folded' );
}
/**
* Initializes the widgets screen
*
* @param {string} id - Id of the root element to render the screen.
*/
export function initialize( id ) {
collapseWpAdminSidebar();
2021-09-07 21:40:48 +02:00
render( <Layout />, document.getElementById( id ) );
2021-08-17 08:33:07 +02:00
}
2021-09-07 21:40:48 +02:00
global.jetpackSearchConfigureInit = initialize;