Skip to content
Snippets Groups Projects
Commit 8cde8224 authored by Jérémie BRISON's avatar Jérémie BRISON
Browse files

fix(search) : fix input + design

parent 51df52c9
No related branches found
No related tags found
3 merge requests!14Recette,!13Dev,!6Topic search
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
margin-left: 0; margin-left: 0;
} }
margin-left: 206px; margin-left: 196px;
} }
.modalplusFiltres { .modalplusFiltres {
@media #{$desktop} { @media #{$desktop} {
margin-left: 0; margin-left: 0;
} }
margin-left: 412px; margin-left: 396px;
} }
.modal { .modal {
max-height: 648px; max-height: 648px;
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
position: absolute; position: absolute;
border: 1px solid $grey-5; border: 1px solid $grey-5;
border-radius: 6px; border-radius: 6px;
margin-top: 3.5px;
@include background-hash; @include background-hash;
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 10px; width: 10px;
......
...@@ -9,10 +9,16 @@ ...@@ -9,10 +9,16 @@
fxLayoutGap="1.5vw" fxLayoutGap="1.5vw"
(ngSubmit)="applyFilter(searchForm.value.searchTerm)" (ngSubmit)="applyFilter(searchForm.value.searchTerm)"
> >
<div class="icon"> <div class="inputSection" fxLayout="row" fxLayoutAlign="space-between center">
<div class="ico-pin-search grey"></div> <input type="text" formControlName="searchTerm" placeholder="Rechercher une adresse, une association..." />
<div class="icon close" (click)="clearInput()">
<div class="ico-close grey"></div>
</div>
<div class="separator"></div>
<div class="icon pin">
<div class="ico-pin-search blue"></div>
</div>
</div> </div>
<input type="text" formControlName="searchTerm" placeholder="Rechercher une adresse, une association..." />
<div class="searchButton"> <div class="searchButton">
<button type="submit">Rechercher</button> <button type="submit">Rechercher</button>
</div> </div>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
@import '../../../../assets/scss/breakpoint'; @import '../../../../assets/scss/breakpoint';
@import '../../../../assets/scss/shapes'; @import '../../../../assets/scss/shapes';
@import '../../../../assets/scss/buttons'; @import '../../../../assets/scss/buttons';
@import '../../../../assets/scss/inputs';
.header { .header {
.title { .title {
...@@ -17,24 +18,31 @@ ...@@ -17,24 +18,31 @@
.content { .content {
margin: 10px 0 0px 0; margin: 10px 0 0px 0;
.icon { .icon {
border: 1px solid $grey; padding: 0 6px 0 6px;
padding: 4px 6px 8px 6px;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: pointer;
&.pin {
margin-bottom: 4px;
}
} }
input { input {
width: 100%;
background-color: $grey-5;
border: none;
@include cn-regular-14; @include cn-regular-14;
display: flex; @include input-search;
align-items: center;
padding-left: 10px;
text-overflow: ellipsis;
color: $grey-1;
outline: none;
} }
.searchSection { .searchSection {
.separator {
height: 100%;
width: 2px;
background-color: $grey-6;
margin: 0 5px 0 5px;
}
.inputSection {
padding: 6px 3px 6px 6px;
min-width: 463px;
border: 1px solid $grey-6;
background-color: $white;
height: 40px;
}
.searchButton { .searchButton {
border: 1px solid $grey-6; border: 1px solid $grey-6;
border-radius: 6px; border-radius: 6px;
...@@ -47,7 +55,7 @@ ...@@ -47,7 +55,7 @@
} }
} }
.btnSection { .btnSection {
padding: 16px 0 8px 0; padding: 16px 0 0px 0;
button { button {
@include btn-filter; @include btn-filter;
.btnText { .btnText {
...@@ -134,8 +142,7 @@ ...@@ -134,8 +142,7 @@
} }
} }
.footerSearchSection { .footerSearchSection {
margin-bottom: 30px; margin: 17px 0px 17px 0px;
margin-right: 20px;
a { a {
@include cn-bold-14; @include cn-bold-14;
......
...@@ -38,6 +38,11 @@ export class SearchComponent implements OnInit { ...@@ -38,6 +38,11 @@ export class SearchComponent implements OnInit {
this.checkedModulesFilter = new Array(); this.checkedModulesFilter = new Array();
} }
// Clear input search
public clearInput(): void {
this.searchForm.reset();
this.applyFilter(null);
}
// Sends an array containing all filters // Sends an array containing all filters
public applyFilter(term: string): void { public applyFilter(term: string): void {
......
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
border-radius: 4px; border-radius: 4px;
background-color: white; background-color: white;
} }
&.grey { &.blue {
background-color: #828282; background-color: $secondary-color;
} }
} }
.ico-dot-available { .ico-dot-available {
...@@ -123,3 +123,23 @@ ...@@ -123,3 +123,23 @@
border-left: 2px solid $purple; border-left: 2px solid $purple;
} }
} }
.ico-close {
width: 15px;
height: 13px;
text-align: center;
&:before {
transform: rotate(45deg);
}
&:after {
transform: rotate(-45deg);
}
}
.ico-close:before,
.ico-close:after {
position: absolute;
content: '';
height: 14px;
width: 2px;
background-color: $grey-6;
}
@mixin input-search {
width: 100%;
border: none;
padding-left: 10px;
text-overflow: ellipsis;
color: $grey-1;
outline: none;
font-style: italic;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment