Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions packages/edit-widgets/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
}
}

.edit-widgets-layout__inserter-panel-header {
padding-top: $grid-unit-10;
padding-right: $grid-unit-10;
display: flex;
justify-content: flex-end;
}

.edit-widgets-layout__inserter-panel-content {
// Leave space for the close button
height: calc(100% - #{$button-size} - #{$grid-unit-10});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
/**
* WordPress dependencies
*/
import { Button, VisuallyHidden } from '@wordpress/components';
import { close } from '@wordpress/icons';
import { __experimentalLibrary as Library } from '@wordpress/block-editor';
import {
useViewportMatch,
__experimentalUseDialog as useDialog,
} from '@wordpress/compose';
import { useCallback, useRef } from '@wordpress/element';
import { useDispatch } from '@wordpress/data';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
Expand All @@ -28,7 +25,6 @@ export default function InserterSidebar() {
return setIsInserterOpened( false );
}, [ setIsInserterOpened ] );

const TagName = ! isMobileViewport ? VisuallyHidden : 'div';
const [ inserterDialogRef, inserterDialogProps ] = useDialog( {
onClose: closeInserter,
focusOnMount: true,
Expand All @@ -42,21 +38,14 @@ export default function InserterSidebar() {
{ ...inserterDialogProps }
className="edit-widgets-layout__inserter-panel"
>
<TagName className="edit-widgets-layout__inserter-panel-header">
<Button
__next40pxDefaultSize
icon={ close }
onClick={ closeInserter }
label={ __( 'Close Block Inserter' ) }
/>
</TagName>
<div className="edit-widgets-layout__inserter-panel-content">
<Library
showInserterHelpPanel
shouldFocusBlock={ isMobileViewport }
rootClientId={ rootClientId }
__experimentalInsertionIndex={ insertionIndex }
ref={ libraryRef }
onClose={ closeInserter }
/>
</div>
</div>
Expand Down
Loading