Skip to content

Commit

Permalink
Fix native styles and remove old native search form file
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 28, 2021
1 parent 6bfbce1 commit 11c7322
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 126 deletions.
5 changes: 2 additions & 3 deletions packages/block-editor/src/components/inserter/menu.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import { LayoutAnimation, TouchableHighlight } from 'react-native';
import { useEffect, useState, useCallback } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import { createBlock } from '@wordpress/blocks';
import { BottomSheet, BottomSheetConsumer } from '@wordpress/components';
import { BottomSheet, BottomSheetConsumer, SearchControl } from '@wordpress/components';

/**
* Internal dependencies
*/
import InserterSearchResults from './search-results';
import InserterSearchForm from './search-form';
import { store as blockEditorStore } from '../../store';
import InserterTabs from './tabs';
import styles from './style.scss';
Expand Down Expand Up @@ -175,7 +174,7 @@ function InserterMenu( {
header={
<>
{ showSearchForm && (
<InserterSearchForm
<SearchControl
onChange={ onChangeSearch }
value={ filterValue }
/>
Expand Down

This file was deleted.

31 changes: 0 additions & 31 deletions packages/block-editor/src/components/inserter/style.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,6 @@
padding-top: 8;
}

.searchForm {
height: 46px;
border-radius: 8px;
color: $gray-dark;
margin: $grid-unit-30;
background-color: $gray-light;
flex-direction: row;
justify-content: space-between;
}

.searchFormDark {
background-color: rgba($white, 0.07);
}

.searchFormInput {
color: $gray-dark;
flex: 2;
}

.searchFormInputDark {
color: $white;
}

.searchFormPlaceholder {
color: $gray;
}

.searchFormPlaceholderDark {
color: rgba($white, 0.8);
}

.inserter-tabs__wrapper {
overflow: hidden;
}
Expand Down
30 changes: 30 additions & 0 deletions packages/components/src/search-control/style.native.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.searchForm {
height: 46px;
border-radius: 8px;
color: $gray-dark;
margin: $grid-unit-30;
background-color: $gray-light;
flex-direction: row;
justify-content: space-between;
}

.searchFormDark {
background-color: rgba($white, 0.07);
}

.searchFormInput {
color: $gray-dark;
flex: 2;
}

.searchFormInputDark {
color: $white;
}

.searchFormPlaceholder {
color: $gray;
}

.searchFormPlaceholderDark {
color: rgba($white, 0.8);
}

0 comments on commit 11c7322

Please sign in to comment.