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:
parent
e95d8044c6
commit
c92ec6bd94
@ -1,5 +1,7 @@
|
|||||||
.form {
|
.form {
|
||||||
margin-bottom: var(--spacer);
|
margin-bottom: var(--spacer);
|
||||||
|
width: 100%;
|
||||||
|
max-width: 30rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form > div > div {
|
.form > div > div {
|
||||||
|
@ -8,11 +8,13 @@ import InputGroup from '../atoms/Input/InputGroup'
|
|||||||
export default function SearchBar({
|
export default function SearchBar({
|
||||||
placeholder,
|
placeholder,
|
||||||
initialValue,
|
initialValue,
|
||||||
filters
|
filters,
|
||||||
|
size
|
||||||
}: {
|
}: {
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
initialValue?: string
|
initialValue?: string
|
||||||
filters?: boolean
|
filters?: boolean
|
||||||
|
size?: 'small' | 'large'
|
||||||
}): ReactElement {
|
}): ReactElement {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const [value, setValue] = useState(initialValue || '')
|
const [value, setValue] = useState(initialValue || '')
|
||||||
@ -37,6 +39,7 @@ export default function SearchBar({
|
|||||||
value={value}
|
value={value}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
required
|
required
|
||||||
|
size={size}
|
||||||
/>
|
/>
|
||||||
<Button onClick={(e: FormEvent<HTMLButtonElement>) => startSearch(e)}>
|
<Button onClick={(e: FormEvent<HTMLButtonElement>) => startSearch(e)}>
|
||||||
Search
|
Search
|
||||||
|
@ -82,7 +82,7 @@ export default function HomePage(): ReactElement {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Container narrow className={styles.searchWrap}>
|
<Container narrow className={styles.searchWrap}>
|
||||||
<SearchBar />
|
<SearchBar size="large" />
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
<section className={styles.latest}>
|
<section className={styles.latest}>
|
||||||
|
Loading…
Reference in New Issue
Block a user