Skip to content

Commit

Permalink
Fix scrollbar for "traffic" card
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-sinitsyn committed Mar 11, 2020
1 parent 497c7cc commit b00da0d
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<nb-card-body>
<ngx-traffic-bar-chart [data]="trafficBarData.data"
[labels]="trafficBarData.labels"
[formatter]="trafficBarData.formatter">
</ngx-traffic-bar-chart>
</nb-card-body>
<ngx-traffic-bar-chart
[data]="trafficBarData.data"
[labels]="trafficBarData.labels"
[formatter]="trafficBarData.formatter"
></ngx-traffic-bar-chart>
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
@import '../../../../@theme/styles/themes';

@include nb-install-component() {
display: flex;
flex-direction: column;
flex: 1;

nb-card-body {
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
}
display: block;
height: 100%;
overflow: hidden;
position: relative;

ngx-traffic-bar-chart {
flex: 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<nb-card-header>
<span>Traffic</span>
<nb-select matRipple [selected]="type" (selectedChange)="changePeriod($event)">
<nb-option matRipple *ngFor="let period of types" [value]="period">{{ period }}</nb-option>
</nb-select>
</nb-card-header>
<span>Traffic</span>
<nb-select matRipple [selected]="type" (selectedChange)="changePeriod($event)">
<nb-option matRipple *ngFor="let period of types" [value]="period">{{ period }}</nb-option>
</nb-select>
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
@import '../../../../@theme/styles/themes';

@include nb-install-component() {
nb-card-header {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: nb-theme(card-header-with-select-padding-top);
padding-bottom: nb-theme(card-header-with-select-padding-bottom);

@include nb-ltr(padding-right, 4rem);
@include nb-rtl(padding-left, 4rem);
}
:host {
display: flex;
align-items: center;
justify-content: space-between;
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
<nb-reveal-card [showToggleButton]="false" [revealed]="revealed">
<nb-card-front>
<nb-card size="small">
<ngx-traffic-cards-header [type]="period" (periodChange)="setPeriodAngGetData($event)"></ngx-traffic-cards-header>
<ngx-traffic-front-card [frontCardData]="trafficListData"></ngx-traffic-front-card>
<nb-card-header>
<ngx-traffic-cards-header [type]="period" (periodChange)="setPeriodAngGetData($event)">
</ngx-traffic-cards-header>
</nb-card-header>
<nb-card-body>
<ngx-traffic-front-card [frontCardData]="trafficListData"></ngx-traffic-front-card>
</nb-card-body>
<nb-icon class="toggle-icon" icon="chevron-up-outline" pack="eva" (click)="toggleView()"></nb-icon>
</nb-card>
</nb-card-front>
<nb-card-back>
<nb-card size="small">
<ngx-traffic-cards-header [type]="period" (periodChange)="setPeriodAngGetData($event)"></ngx-traffic-cards-header>
<ngx-traffic-back-card [trafficBarData]="trafficBarData"></ngx-traffic-back-card>
<nb-card-header>
<ngx-traffic-cards-header [type]="period" (periodChange)="setPeriodAngGetData($event)">
</ngx-traffic-cards-header>
</nb-card-header>
<nb-card-body>
<ngx-traffic-back-card [trafficBarData]="trafficBarData"></ngx-traffic-back-card>
</nb-card-body>
<nb-icon class="toggle-icon" icon="chevron-down-outline" pack="eva" (click)="toggleView()"></nb-icon>
</nb-card>
</nb-card-back>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@
@include nb-rtl(left, 1.25rem);
cursor: pointer;
}

nb-card-header {
padding-top: nb-theme(card-header-with-select-padding-top);
padding-bottom: nb-theme(card-header-with-select-padding-bottom);
@include nb-ltr(padding-right, 4rem);
@include nb-rtl(padding-left, 4rem);
}
}

0 comments on commit b00da0d

Please sign in to comment.