diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-02-25 19:17:09 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-02-25 19:17:09 +0100 |
| commit | e26d821f738525477472e631d170d9ed218c1603 (patch) | |
| tree | 70ec0c29d003d462de6926f1faa09354e3ff6d90 /src/components/SearchForm | |
| parent | cb4764f8670f67627c407591c89b8d3637c190a7 (diff) | |
chore: combine input/textarea/select in a single component
Diffstat (limited to 'src/components/SearchForm')
| -rw-r--r-- | src/components/SearchForm/SearchForm.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/SearchForm/SearchForm.tsx b/src/components/SearchForm/SearchForm.tsx index fa3ad07..fe809a3 100644 --- a/src/components/SearchForm/SearchForm.tsx +++ b/src/components/SearchForm/SearchForm.tsx @@ -1,5 +1,5 @@ import { ButtonSubmit } from '@components/Buttons'; -import { Form, Input } from '@components/Form'; +import { Field, Form } from '@components/FormElements'; import { SearchIcon } from '@components/Icons'; import { useRouter } from 'next/router'; import { FormEvent, useEffect, useRef, useState } from 'react'; @@ -34,20 +34,21 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => { description: 'SearchForm : form title', })} </div> - <Form submitHandler={launchSearch} modifier="search" id="search"> + <Form submitHandler={launchSearch} kind="search" id="search"> <label htmlFor="search-query" className="screen-reader-text"> {intl.formatMessage({ defaultMessage: 'Keywords:', description: 'SearchForm: search field label', })} </label> - <Input + <Field ref={inputRef} id="search-query" name="search-query" - type="search" + kind="search" value={query} setValue={setQuery} + required={true} /> <ButtonSubmit modifier="search"> <SearchIcon /> |
