Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@include subtitle-2;
display: inline-flex;
align-items: center;
padding: 4px 8px;
border-radius: 2px;

.label {
Expand Down
7 changes: 6 additions & 1 deletion projects/components/src/panel/panel.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import 'color-palette';

.ht-panel {
padding: 4px;
padding: 12px 10px;
display: flex;
flex-direction: column;

Expand All @@ -23,6 +23,11 @@
overflow: auto;
height: 100%;
}

&.bordered {
border: 1px solid $gray-2;
border-radius: 10px;
}
}

.disabled {
Expand Down
14 changes: 13 additions & 1 deletion projects/components/src/panel/panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ViewChild,
ViewContainerRef
} from '@angular/core';
import { Color } from '@hypertrace/common';
import { PanelBodyComponent } from './body/panel-body.component';
import { PanelHeaderComponent } from './header/panel-header.component';

Expand All @@ -19,7 +20,12 @@ import { PanelHeaderComponent } from './header/panel-header.component';
styleUrls: ['./panel.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<div class="ht-panel fill-container" [htLayoutChangeTrigger]="this.expanded">
<div
class="ht-panel fill-container"
[htLayoutChangeTrigger]="this.expanded"
[style.backgroundColor]="this.backgroundColor"
[ngClass]="{ bordered: this.showBorder }"
>
<div *ngIf="this.header" [ngClass]="{ disabled: this.disabled, expanded: this.expanded }" class="header">
<ng-container #headerContainer></ng-container>
</div>
Expand All @@ -36,6 +42,12 @@ export class PanelComponent implements AfterViewInit {
@Input()
public disabled: boolean = false;

@Input()
public backgroundColor: string = Color.White;

@Input()
public showBorder: boolean = false;

@Output()
public readonly expandedChange: EventEmitter<boolean> = new EventEmitter();

Expand Down