Skip to content

Commit

Permalink
improve search css and code
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Wilke committed Nov 13, 2023
1 parent 0b769b5 commit ed074d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/SearchPastes/SearchPastes.tsx
Original file line number Diff line number Diff line change
@@ -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<PasteSearchView>
onSearchEnter: (term: String) => void
onSearchEnter: (term: string) => void
}

const SearchPastes: Component<SearchPastesProps> = ({term, pastes, onSearchEnter}): JSX.Element => {
Expand Down Expand Up @@ -35,7 +35,7 @@ const SearchPastes: Component<SearchPastesProps> = ({term, pastes, onSearchEnter
<>
<form autocomplete="off" class={styles.searchForm} onSubmit={submitOnClick}>
<fieldset>
<input onKeyUp={submitOnEnter} value={term} type="search" required minlength="3" maxlength="25" placeholder="Search for pastes" autofocus />
<input ref={searchInput} onKeyUp={submitOnEnter} value={term} type="search" required minlength="3" maxlength="25" placeholder="Search for pastes" autofocus />
<input type="submit" value="Search"/>
<input type="reset" value="Reset"/>
</fieldset>
Expand Down
26 changes: 5 additions & 21 deletions frontend/src/components/SearchPastes/searchPastes.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

0 comments on commit ed074d5

Please sign in to comment.