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
24 changes: 24 additions & 0 deletions projects/assets-library/assets/styles/_interaction.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,27 @@

@include list-hover;
}

@mixin top-bar-light-button-background {
background-color: white;

&:hover {
background-color: $gray-1;
}
}

@mixin top-bar-light-button-foreground {
@include body-1-medium($gray-8);
}

@mixin top-bar-dark-button-background {
background-color: $gray-6;

&:hover {
background-color: $gray-5;
}
}

@mixin top-bar-dark-button-foreground {
@include body-1-medium(white);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@
padding-left: 46px;
}

.right-side {
.right-side-content {
display: flex;
margin-left: auto;
align-items: center;
}

.left-side-content {
display: flex;
align-items: center;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use justify content: flex-start here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's the default, it's already behaving that way.


.header-action {
cursor: pointer;
padding: 0 12px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ import { GLOBAL_HEADER_HEIGHT, NavigationService } from '@hypertrace/common';
<ng-content select="[logo]"></ng-content>
</div>
<div class="divider"></div>
<div class="left-side-content">
<ng-content select="[left]"></ng-content>
</div>
<div class="time-range">
<ht-time-range></ht-time-range>
</div>
</div>
<div class="right-side">
<div class="right-side-content">
<ng-content></ng-content>
<ng-content select="[right]"></ng-content>
</div>
</div>
`
Expand Down
13 changes: 11 additions & 2 deletions projects/components/src/select/select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@
align-items: center;
border: 1px solid $color-border;
border-radius: 6px;
height: 100%;
width: 100%;
height: 34px;

&.small {
height: 32px;
}

.select-container {
width: 100%;
height: 100%;
}

&.disabled {
Expand Down Expand Up @@ -52,7 +57,7 @@
align-items: center;
padding: 0 8px;
cursor: pointer;
height: 34px;
height: 100%;

&.justify-left {
justify-content: flex-start;
Expand Down Expand Up @@ -108,5 +113,9 @@
&:hover {
background: $gray-1;
}

&.small {
height: 32px;
}
}
}
7 changes: 6 additions & 1 deletion projects/components/src/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ import { SelectSize } from './select-size';
</ht-popover-trigger>
<ht-popover-content>
<div class="select-content">
<div *ngFor="let item of items" (click)="this.onSelectionChange(item)" class="select-option">
<div
*ngFor="let item of items"
(click)="this.onSelectionChange(item)"
class="select-option"
[ngClass]="this.size"
>
<span class="label">{{ item.label }}</span>
<ht-icon
class="status-icon"
Expand Down
40 changes: 18 additions & 22 deletions projects/components/src/time-range/time-range.component.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
@import 'mixins';

@mixin top-bar-button() {
// Custom styling for top bar different shades than normal buttons
background-color: $gray-6;
border-radius: 6px;

&:hover {
background-color: $gray-5;
}
}

.time-range {
display: flex;
align-items: center;
}

.time-range-selector {
@include top-bar-button();
@include top-bar-dark-button-background;
@include top-bar-dark-button-foreground;
min-width: 200px;
color: white;
border-radius: 6px;
}

.trigger {
Expand Down Expand Up @@ -49,16 +40,21 @@
}
}

.refresh {
::ng-deep {
button.button.secondary {
@include top-bar-button();
:host {
.refresh {
::ng-deep {
button.button.solid {
@include top-bar-dark-button-background;
.label {
@include top-bar-dark-button-foreground;
}
}
}

margin-left: 8px;
cursor: pointer;
height: 32px;
display: flex;
align-items: center;
}
margin-left: 8px;
cursor: pointer;
height: 32px;
display: flex;
align-items: center;
color: $gray-3;
}