Skip to content

Commit

Permalink
fix mobile styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Oct 18, 2022
1 parent bc7d88c commit 1ff89b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import MediaList from './media-list';
import { useMediaResults, useDebouncedInput } from './hooks';
import InserterNoResults from '../no-results';

const INITIAL_MEDIA_ITEMS_PER_PAGE = 10;
const EMPTY_ARRAY = [];

export function MediaCategoryDialog( { rootClientId, onInsert, category } ) {
Expand All @@ -26,7 +27,7 @@ export function MediaCategoryDialog( { rootClientId, onInsert, category } ) {
return () => clearTimeout( timeout );
}, [ category ] );
return (
<div ref={ container }>
<div ref={ container } className="block-editor-inserter__media-dialog">
<MediaCategoryPanel
rootClientId={ rootClientId }
onInsert={ onInsert }
Expand All @@ -36,7 +37,6 @@ export function MediaCategoryDialog( { rootClientId, onInsert, category } ) {
);
}

const INITIAL_MEDIA_ITEMS_PER_PAGE = 10;
export function MediaCategoryPanel( { rootClientId, onInsert, category } ) {
const [ search, setSearch, debouncedSearch ] = useDebouncedInput();
const results = useMediaResults( {
Expand Down
32 changes: 18 additions & 14 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ $block-inserter-tabs-height: 44px;
}
}

.block-editor-inserter__media-panel {
.block-editor-inserter__media-dialog {
background: $gray-100;
border-left: $border-width solid $gray-200;
border-right: $border-width solid $gray-200;
Expand All @@ -554,21 +554,25 @@ $block-inserter-tabs-height: 44px;
}
}

&-title {
font-size: calc(1.25 * 13px);
}

&-spinner {
.block-editor-inserter__media-panel {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}

&-search {
&.components-search-control {
input[type="search"].components-search-control__input {
background: $white;
&-title {
font-size: calc(1.25 * 13px);
}

&-spinner {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}

&-search {
&.components-search-control {
input[type="search"].components-search-control__input {
background: $white;
}
}
}
}
Expand Down

0 comments on commit 1ff89b9

Please sign in to comment.