finish base filter form

This commit is contained in:
b1ek 2023-05-08 22:53:28 +10:00
parent ca749322f7
commit aada1271a0
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 41 additions and 6 deletions

View File

@ -122,7 +122,7 @@ const SearchBarSpacer = styled.div`
margin: 0 20px margin: 0 20px
`; `;
const FilterArea = styled.input` const SearchBarInput = styled.input`
border: 0; background: 0; border: 0; background: 0;
margin: 0 16px; margin: 0 16px;
margin-right: 0; margin-right: 0;
@ -149,9 +149,15 @@ const FiltersForm = () => {
per_day: false, per_day: false,
per_month: false, per_month: false,
area_from: 0, area_from: '',
area_to: 0, area_to: '',
rooms: apart_sizes[2]
price_from: '',
price_to: '',
address: '',
rooms: 0,
}; };
@ -188,7 +194,7 @@ const FiltersForm = () => {
<SearchBarText> <SearchBarText>
Площадь Площадь
<span style={{color:'gray', paddingLeft: 10}}> от </span> <span style={{color:'gray', paddingLeft: 10}}> от </span>
<FilterArea <SearchBarInput
type='text' type='text'
placeholder='—' placeholder='—'
maxLength='3' maxLength='3'
@ -196,7 +202,7 @@ const FiltersForm = () => {
onChange={(e) => setState({area_from: e.target.value})}/> onChange={(e) => setState({area_from: e.target.value})}/>
<span style={{color:'gray', paddingLeft: 10}}> до </span> <span style={{color:'gray', paddingLeft: 10}}> до </span>
<FilterArea <SearchBarInput
type='text' type='text'
placeholder='—' placeholder='—'
maxLength='3' maxLength='3'
@ -212,6 +218,35 @@ const FiltersForm = () => {
value={state.rooms} /> value={state.rooms} />
<SearchBarSpacer /> <SearchBarSpacer />
Цена
<span style={{color:'gray', paddingLeft: 6}}> от </span>
<SearchBarInput
type='text'
placeholder='—'
value={state.price_from}
onChange={(e) => setState({price_from: e.target.value})}
style={{width:60}} />
<span style={{color:'gray', paddingLeft: 6}}> до </span>
<SearchBarInput
type='text'
placeholder='—'
value={state.price_to}
onChange={(e) => setState({price_to: e.target.value})}
style={{width:60}} />
<SearchBarSpacer />
<SearchBarInput
type='text'
placeholder='Район, квартал, ж/д, индекс...'
value={state.address}
onChange={(e) => setState({address: e.target.value})}
style={{width:300,marginLeft:0}} />
</SearchBarText> </SearchBarText>
</SearchBarFilter> </SearchBarFilter>