Skip to content

Commit 2fc5a37

Browse files
authored
Merge branch 'main' into confirmation-modal-styling
2 parents e8d0a20 + d0a2408 commit 2fc5a37

File tree

7 files changed

+31
-15
lines changed

7 files changed

+31
-15
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"jest-junit": "^13.0.0",
108108
"jest-preset-angular": "^8.4.0",
109109
"lodash": "^4.17.21",
110-
"ng-mocks": "^13.2.0",
110+
"ng-mocks": "^13.3.0",
111111
"ng-packagr": "^12.2.5",
112112
"prettier": "^2.2.1",
113113
"pretty-quick": "^3.1.3",

projects/components/src/panel/header/title/panel-title.component.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
@include subtitle-2;
55
display: inline-flex;
66
align-items: center;
7-
padding: 4px 8px;
87
border-radius: 2px;
98

109
.label {

projects/components/src/panel/panel.component.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import 'color-palette';
33

44
.ht-panel {
5-
padding: 4px;
5+
padding: 12px 10px;
66
display: flex;
77
flex-direction: column;
88

@@ -23,6 +23,11 @@
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 {

projects/components/src/panel/panel.component.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
ViewChild,
1212
ViewContainerRef
1313
} from '@angular/core';
14+
import { Color } from '@hypertrace/common';
1415
import { PanelBodyComponent } from './body/panel-body.component';
1516
import { 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

projects/components/src/table/cells/data-renderers/relative-timestamp/relative-timestamp-table-cell-renderer.component.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
TooltipDirective
77
} from '@hypertrace/components';
88
import { createComponentFactory } from '@ngneat/spectator/jest';
9-
import { MockComponent, MockPipe } from 'ng-mocks';
9+
import { MockDirective, MockPipe } from 'ng-mocks';
1010
import { tableCellDataProvider } from '../../test/cell-providers';
1111
import {
1212
RelativeTimestampTableCellRendererComponent,
@@ -24,7 +24,7 @@ describe('relative timestamp table cell renderer component', () => {
2424
new TableCellNoOpParser(undefined!)
2525
)
2626
],
27-
declarations: [MockComponent(TooltipDirective), MockPipe(DisplayDatePipe)],
27+
declarations: [MockDirective(TooltipDirective), MockPipe(DisplayDatePipe)],
2828
shallow: true
2929
});
3030

projects/observability/src/shared/components/table/data-cell/exit-calls/exit-calls-table-cell-renderer.component.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
TooltipDirective
66
} from '@hypertrace/components';
77
import { createComponentFactory } from '@ngneat/spectator/jest';
8-
import { MockComponent } from 'ng-mocks';
8+
import { MockDirective } from 'ng-mocks';
99
import { ExitCallsTableCellRendererComponent } from './exit-calls-table-cell-renderer.component';
1010

1111
describe('Exit Calls table cell renderer component', () => {
@@ -19,7 +19,7 @@ describe('Exit Calls table cell renderer component', () => {
1919
new TableCellNoOpParser(undefined!)
2020
)
2121
],
22-
declarations: [MockComponent(TooltipDirective)],
22+
declarations: [MockDirective(TooltipDirective)],
2323
shallow: true
2424
});
2525

0 commit comments

Comments
 (0)