Skip to content

Commit

Permalink
fix styling of search results in ContentSearch component
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed Apr 16, 2024
1 parent 8c01b8d commit 434edbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/content-search/SearchItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const ButtonStyled = styled(Button)`
.block-editor-link-control__search-item-header {
display: flex;
flex-direction: column;
align-items: flex-start;
}
mark {
Expand Down
14 changes: 11 additions & 3 deletions components/content-search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ const LoadingContainer = styled.div`
}
`;

const StyledNavigableMenu = styled(NavigableMenu)`
width: 100%;
`;

const StyledSearchControl = styled(SearchControl)`
width: 100%;
`;

const ContentSearch = ({
onSelectItem,
placeholder,
Expand Down Expand Up @@ -353,8 +361,8 @@ const ContentSearch = ({

return (
<StyledComponentContext cacheKey="tenup-component-content-search">
<NavigableMenu onNavigate={handleOnNavigate} orientation="vertical">
<SearchControl
<StyledNavigableMenu onNavigate={handleOnNavigate} orientation="vertical">
<StyledSearchControl
__next40pxDefaultSize
value={searchString}
onChange={(newSearchString) => {
Expand Down Expand Up @@ -444,7 +452,7 @@ const ContentSearch = ({
{isLoading && currentPage > 1 && <StyledSpinner />}
</>
) : null}
</NavigableMenu>
</StyledNavigableMenu>
</StyledComponentContext>
);
};
Expand Down

0 comments on commit 434edbe

Please sign in to comment.