File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
projects/components/src/panel Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 44 @include subtitle-2 ;
55 display : inline-flex ;
66 align-items : center ;
7- padding : 4px 8px ;
87 border-radius : 2px ;
98
109 .label {
Original file line number Diff line number Diff line change 22@import ' color-palette' ;
33
44.ht-panel {
5- padding : 4 px ;
5+ padding : 12 px 10 px ;
66 display : flex ;
77 flex-direction : column ;
88
2323 overflow : auto ;
2424 height : 100% ;
2525 }
26+
27+ & .bordered {
28+ border : 1px solid $gray-2 ;
29+ border-radius : 10px ;
30+ }
2631}
2732
2833.disabled {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 ViewChild ,
1212 ViewContainerRef
1313} from '@angular/core' ;
14+ import { Color } from '@hypertrace/common' ;
1415import { PanelBodyComponent } from './body/panel-body.component' ;
1516import { PanelHeaderComponent } from './header/panel-header.component' ;
1617
@@ -19,7 +20,12 @@ import { PanelHeaderComponent } from './header/panel-header.component';
1920 styleUrls : [ './panel.component.scss' ] ,
2021 changeDetection : ChangeDetectionStrategy . OnPush ,
2122 template : `
22- <div class="ht-panel fill-container" [htLayoutChangeTrigger]="this.expanded">
23+ <div
24+ class="ht-panel fill-container"
25+ [htLayoutChangeTrigger]="this.expanded"
26+ [style.backgroundColor]="this.backgroundColor"
27+ [ngClass]="{ bordered: this.showBorder }"
28+ >
2329 <div *ngIf="this.header" [ngClass]="{ disabled: this.disabled, expanded: this.expanded }" class="header">
2430 <ng-container #headerContainer></ng-container>
2531 </div>
@@ -36,6 +42,12 @@ export class PanelComponent implements AfterViewInit {
3642 @Input ( )
3743 public disabled : boolean = false ;
3844
45+ @Input ( )
46+ public backgroundColor : string = Color . White ;
47+
48+ @Input ( )
49+ public showBorder : boolean = false ;
50+
3951 @Output ( )
4052 public readonly expandedChange : EventEmitter < boolean > = new EventEmitter ( ) ;
4153
You can’t perform that action at this time.
0 commit comments