add cringe buton to front

This commit is contained in:
b1ek 2023-05-18 16:34:47 +10:00
parent 91e3a0e4bf
commit f256d04d26
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 17 additions and 3 deletions

View File

@ -155,6 +155,13 @@ const SliderContainer = styled.div`
}
`;
const CringeButton = styled.button`
padding: 4px 8px;
font-size: 20pt;
border: 1px solid #c2c4c2;
border-radius: 6px;
`;
const FiltersForm = (props) => {
const apart_sizes = [
@ -336,7 +343,8 @@ export default class IndexPage extends React.Component {
page: 1,
data_loaded: false,
load_err: false,
loading_filters: false
loading_filters: false,
isCringe: false
};
ApartamentService.getAll(100).then(data => {
@ -384,9 +392,15 @@ export default class IndexPage extends React.Component {
</AutoplaySlider>
</SliderContainer>
<Title>
<Title
onMouseEnter={() => {this.setState({isCringe: true})}}
onMouseLeave={() => {this.setState({isCringe: false})}}
>
Выбор квартиры во
<span style={{color: '#0066ff'}}> Владивостоке</span>
<span style={{color: '#0066ff'}}> {
this.state.isCringe ?
<CringeButton>кринж</CringeButton> :
'Владивостоке'}</span>
</Title>
<FiltersForm onSubmit={this.filterData} loading={this.state.loading_filters} />