From 6f3fa90f07458c2e6a303549fea6445464a74e04 Mon Sep 17 00:00:00 2001 From: Taylor Lovett Date: Thu, 18 Mar 2021 11:56:23 -0400 Subject: [PATCH 1/4] Make class namespaces more accurate; don't show type label in search result if we are only searching one type --- components/ContentPicker/index.js | 2 +- components/ContentSearch/SearchItem.js | 5 +++-- components/ContentSearch/index.js | 11 ++++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/components/ContentPicker/index.js b/components/ContentPicker/index.js index 673fd21e..b801441c 100644 --- a/components/ContentPicker/index.js +++ b/components/ContentPicker/index.js @@ -7,7 +7,7 @@ import { __ } from '@wordpress/i18n'; import { ContentSearch } from '../ContentSearch'; import SortableList from './SortableList'; -const NAMESPACE = '10up-block-components'; +const NAMESPACE = '10up-content-picker'; /** * Content Picker diff --git a/components/ContentSearch/SearchItem.js b/components/ContentSearch/SearchItem.js index 470d4b5e..5ab388ad 100644 --- a/components/ContentSearch/SearchItem.js +++ b/components/ContentSearch/SearchItem.js @@ -14,7 +14,7 @@ import { Button, TextHighlight } from '@wordpress/components'; * @param props.id * @return {*} React JSX */ -const SearchItem = ({ suggestion, onClick, searchTerm, isSelected, id }) => { +const SearchItem = ({ suggestion, onClick, searchTerm, isSelected, id, contentTypes }) => { return (