From 6c65c41a09de0850a7450d3978e18445e23c2734 Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 23 May 2024 16:41:24 +1000 Subject: [PATCH] feat: added subtitle header to search results --- ts/components/search/SearchResults.tsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/ts/components/search/SearchResults.tsx b/ts/components/search/SearchResults.tsx index 7597c1307..403087a43 100644 --- a/ts/components/search/SearchResults.tsx +++ b/ts/components/search/SearchResults.tsx @@ -13,17 +13,18 @@ import { getSearchTerm, } from '../../state/selectors/search'; -const StyledSeparatorSection = styled.div` +const StyledSeparatorSection = styled.div<{ isSubtitle: boolean }>` height: 36px; line-height: 36px; + letter-spacing: 0; margin-inline-start: 16px; - - color: var(--text-secondary-color); - - font-size: var(--font-size-sm); font-weight: 400; - letter-spacing: 0; + + ${props => + props.isSubtitle + ? 'color: var(--text-secondary-color); font-size: var(--font-size-sm);' + : 'color: var(--text-primary-color); font-size: var(--font-size-lg);'} `; const SearchResultsContainer = styled.div` @@ -40,7 +41,16 @@ const NoResults = styled.div` `; const SectionHeader = ({ title, style }: { title: string; style: CSSProperties }) => { - return {title}; + return ( + + {title} + + ); }; function isContact(item: SearchResultsMergedListItem): item is { contactConvoId: string } {