From ed074d5db7610692fb5f5db47599af0626ff506e Mon Sep 17 00:00:00 2001 From: Stefan Wilke Date: Mon, 13 Nov 2023 20:42:54 +0100 Subject: [PATCH] improve search css and code --- .../components/SearchPastes/SearchPastes.tsx | 8 +++--- .../SearchPastes/searchPastes.module.css | 26 ++++--------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/frontend/src/components/SearchPastes/SearchPastes.tsx b/frontend/src/components/SearchPastes/SearchPastes.tsx index 4d4bec4..3205b07 100644 --- a/frontend/src/components/SearchPastes/SearchPastes.tsx +++ b/frontend/src/components/SearchPastes/SearchPastes.tsx @@ -1,13 +1,13 @@ -import {Component, JSX, Show} from 'solid-js'; +import {Component, JSX, Show, For} from 'solid-js'; import {A} from '@solidjs/router'; import {PasteSearchView} from '../../api/model/PasteSearchView'; import {toDateTimeString} from '../../datetime/DateTimeUtil'; import styles from "./searchPastes.module.css"; type SearchPastesProps = { - term: String + term: string pastes: Array - onSearchEnter: (term: String) => void + onSearchEnter: (term: string) => void } const SearchPastes: Component = ({term, pastes, onSearchEnter}): JSX.Element => { @@ -35,7 +35,7 @@ const SearchPastes: Component = ({term, pastes, onSearchEnter <>
- +
diff --git a/frontend/src/components/SearchPastes/searchPastes.module.css b/frontend/src/components/SearchPastes/searchPastes.module.css index 89d63c1..48ef3f2 100644 --- a/frontend/src/components/SearchPastes/searchPastes.module.css +++ b/frontend/src/components/SearchPastes/searchPastes.module.css @@ -26,20 +26,12 @@ cursor: pointer; } - - - .searchResults { - margin-top: 0; - padding-top: 0; - border-left: 1px dotted #a5a5a5; -} - -.searchResults ol { - list-style: none; margin: 0; padding: 0; - + list-style: none; + border: 1px dotted #a5a5a5; + border-radius: 7px; } .searchResults .item { @@ -48,14 +40,6 @@ border-top: 1px dotted #a5a5a5; } -.searchResults .item p { - display: inline-flex; - align-items: start; - gap: 3px; +.searchResults .item:first-child { + border-top: none; } - -.searchResults .item p { - display: inline-flex; - align-items: start; - gap: 3px; -} \ No newline at end of file