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
@@ -1,8 +1,8 @@
@import 'color-palette';
@import 'font';
@import 'mixins';

.nav-item {
@include font-left-nav-label;
@include raised-shadow-hover();
color: $gray-7;
display: flex;
height: 36px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { NavItemLinkConfig } from '../navigation-list.component';
<ht-icon
class="icon"
[icon]="this.config.icon"
size="${IconSize.Medium}"
size="{{ this.config.iconSize !== undefined ? this.config.iconSize : '${IconSize.Medium}' }}"
[label]="this.config.label"
[showTooltip]="this.collapsed"
>
Expand All @@ -30,6 +30,15 @@ import { NavItemLinkConfig } from '../navigation-list.component';
<span class="soon">SOON</span>
</span>
<ht-beta-tag *ngIf="config.isBeta" class="beta"></ht-beta-tag>
<ht-icon
class="trailing-icon"
*ngIf="this.config.trailingIcon"
[icon]="this.config.trailingIcon"
size="{{ this.config.iconSize !== undefined ? this.config.iconSize : '${IconSize.Medium}' }}"
[ngStyle]="{ color: this.config.trailingIconColor }"
[htTooltip]="this.config.trailingIconTooltip"
>
</ht-icon>
</div>
</div>
</ht-link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { IconType } from '@hypertrace/assets-library';
import { NavigationService } from '@hypertrace/common';
import { Color, NavigationService } from '@hypertrace/common';
import { Observable } from 'rxjs';
import { map, startWith } from 'rxjs/operators';
import { IconSize } from '../icon/icon-size';
Expand Down Expand Up @@ -103,11 +103,15 @@ export type NavItemConfig = NavItemLinkConfig | NavItemHeaderConfig | NavItemDiv
export interface NavItemLinkConfig {
type: NavItemType.Link;
icon: string;
iconSize?: IconSize;
label: string;
matchPaths: string[]; // For now, default path is index 0
features?: string[];
replaceCurrentHistory?: boolean;
isBeta?: boolean;
trailingIcon?: string;
trailingIconTooltip?: string;
trailingIconColor?: Color;
}

export type FooterItemConfig = FooterItemLinkConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { LabelModule } from '../label/label.module';
import { LayoutChangeModule } from '../layout/layout-change.module';
import { LetAsyncModule } from '../let-async/let-async.module';
import { LinkModule } from '../link/link.module';
import { TooltipModule } from './../tooltip/tooltip.module';
import { NavItemComponent } from './nav-item/nav-item.component';
import { NavigationListComponent } from './navigation-list.component';

Expand All @@ -26,7 +27,8 @@ import { NavigationListComponent } from './navigation-list.component';
LabelModule,
BetaTagModule,
MemoizeModule,
LinkModule
LinkModule,
TooltipModule
],
declarations: [NavigationListComponent, NavItemComponent],
exports: [NavigationListComponent]
Expand Down