1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

search bar fixes

This commit is contained in:
Matthias Kretschmann 2020-10-31 00:55:39 +01:00
parent e95d8044c6
commit c92ec6bd94
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,7 @@
.form {
margin-bottom: var(--spacer);
width: 100%;
max-width: 30rem;
}
.form > div > div {

View File

@ -8,11 +8,13 @@ import InputGroup from '../atoms/Input/InputGroup'
export default function SearchBar({
placeholder,
initialValue,
filters
filters,
size
}: {
placeholder?: string
initialValue?: string
filters?: boolean
size?: 'small' | 'large'
}): ReactElement {
const navigate = useNavigate()
const [value, setValue] = useState(initialValue || '')
@ -37,6 +39,7 @@ export default function SearchBar({
value={value}
onChange={handleChange}
required
size={size}
/>
<Button onClick={(e: FormEvent<HTMLButtonElement>) => startSearch(e)}>
Search

View File

@ -82,7 +82,7 @@ export default function HomePage(): ReactElement {
return (
<>
<Container narrow className={styles.searchWrap}>
<SearchBar />
<SearchBar size="large" />
</Container>
<section className={styles.latest}>