Skip to content

Commit

Permalink
fix: borders of search results style aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
bodobraegger committed Oct 16, 2023
1 parent da82fea commit 0fb6b60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/components/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function SearchForm({ t, sections, minKeyWordLength = 3 }: Props) {
if (searchResults.length > 0) {
// render results
return searchResults.map(result => {
return <div key={result.id} className='search-result'>
return <div key={result.id} className='search-result border rounded'>
<div className='title-match'>
<Link to={`/${result.section.slug}`}>
{result.section.title}
Expand All @@ -149,7 +149,8 @@ function SearchForm({ t, sections, minKeyWordLength = 3 }: Props) {
return <ReactMarkdown key={idx}
remarkPlugins={[remarkGfm, strip_md, strip_html]}
components={LinkComponent}
children={content}
children={content}
className='border-bottom'
/>
})}
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/styles/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
flex-direction: column;
gap: 8px;

border: 1px solid #ebebeb;
border-radius: 6px;
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.2);
padding: 10px 12px;
animation: fadeIn 0.5s;

Expand All @@ -32,10 +29,12 @@
}

>:not(:last-child) {
border-bottom: 1px solid #ebebeb;
margin-bottom: 8px;
padding-bottom: 8px;
}
>:last-child {
border-bottom: none !important;
}
}
}

Expand Down

0 comments on commit 0fb6b60

Please sign in to comment.